mm245/ma260 lab5
http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/l5.html
-
As well as coming to the supervised lab - you are expected
to work on this lab on your own outside of lab hours (in your own time).
-
For this lab you must submit all source code (matlab/scilab/octave .m files).
The code should have comments of explanation, with at least as many
comments as code.
This should be sent in via BLACKBOARD (not directly by email).
Any questions asked should be answered by
typing into a plain text (.txt) file (or inserted at
the end of MATLAB/SCILAB/OCTAVE code after the percentage (comment) symbol)
which should also
be uploaded via blackboard.
-
This material should be uploaded
before
the deadline of 5pm
Friday November 22nd, 2013. You will lose 20% for each day
(or part of day) the lab is late.
-
Plagiarism (the unattributed copying of work from other sources
(internet, fellow students,....)) will not be tolerated. Please see
http://www.nuigalway.ie/engineering/documents/plagiarism_guide_students
_v4.pdf. You risk getting zero for your lab if it is found to be
plagiarized.
-
If you are really stuck:
-
Ask in the lab
-
Post a question in the Discussion Board in BLACKBOARD
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.
-
Write a function in MATLAB/SCILAB/OCTAVE that calculates the
distance between two vectors v1 and
v2.
-
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.
-
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