I need help writing a computer program using MATLAB involving the Jacobi Method

Write a computer program to perform Jacobi iteration for the system of
equations given in Problem 1. Use x1 = x2 = x3 = 0 as the starting solution
(initial guess). The program should prompt the user to input the convergence
criteria value and the maximum number of iterations allowed and should out-
put the solution along with the number of iterations it took for the solution to
converge to the user specied value.
Now, I need the A matrix and the b to be in the program and not just something that you type in later on and then apply a function. I have already written a Gauss Seidel Code but for some reason I am struggling with the Jacobi one with the exact same matrix.
The A Matrix is [-1,2,1;-1,4,1;-2,4,3] and the b matrix is [1;2;3]. I need Ax = b using the Jacobi Method

2 Comments

Hi Kevin. Thanks for asking. In most forums, students asking for help with their homework are expected to show their own efforts at researching and solving the assigned problem.

Sign in to comment.

Answers (0)

Asked:

on 16 Sep 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!