![]() ![]() We calculate the value for x k p one and then check if the relative error is lesser than tolerance level.Printf( "iter = %d, Relative Error = %g\n", k, RelativeError ) RelativeError = norm( xkp1 - xk, 'inf' ) / norm( xkp1, 'inf' ) We check if the size of A matrix and initial values matrix are compatible with each other. Here x zero is the initial values matrix.Įrror( "Sizes of input matrix and input vector do not match" ) Then we define the function Jacobi Iteration with input arguments ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |