How to solve a system linear equations with four unknowns in Numpy
By Jastin Manya

How to solve a system linear equations with four unknowns in Numpy

You will have to import the numpy module.        
Start by setting the limit because we are following Jacobi method.

Initialize the matrix by picking the coefficient of the variables. Ensure that their position is not altered.

No alt text provided for this image

Initialize the right hand side as a row matrix.

No alt text provided for this image

Display the system of equations on the screen to confirm.

No alt text provided for this image

Write an algorithm for the iteration until a common set of solutions is reached.

No alt text provided for this image

The output is as shown below.

No alt text provided for this image

Print the solution to the screen.

No alt text provided for this image

That is how easy it ease to use Python for mathematical calculations.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了