Jacobi Method is an iterative algorithm for solving linear system of equations. Here is an implementation of Jacobi method in Matlab:
main.m1128 chars56 lines
To use the above function, you can simply call it with the input parameters:
main.m139 chars7 lines
This will solve the linear system of equations Ax = b using Jacobi Method with initial guess x0, tolerance tol, and maximum number of iterations max_iter. The solution vector x and number of iterations required to converge num_iter will be returned.
gistlibby LogSnag