mm245/ma260 lab5


http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/l5.html




You should study (and run) the code in jacobi.m at http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/matlab/ which is commented to explain its operation.

  1. Write a function in MATLAB/SCILAB/OCTAVE that calculates the distance between two vectors v1 and v2.
  2. Using your function, program in MATLAB a Jacobi iterative scheme to solve the system of equations here. You should start with an initial vector x(0) of all zeros, and terminate when the distance between successive estimates is less than 0.003.
    • How many iterations do you need to get error less than 0.003?
    • From your numerical estimates - can you "guess" the actual solution (given that they are all integers)? Check your answer and submit it.
  3. Write a function in MATLAB to test whether or not a matrix is strictly diagonally dominant. (You should test your function on the 8x8 matrix from the previous part).


© NUI, Galway