mm245/ma260 lab1
http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/l1.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 September 27th, 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
-
If you are in any way unsure how to submit your lab via BLACKBOARD, you
should ask about this in the lab. Such questions will not be answered
at lectures or via email.
Read and execute the files graphical.m and
fixedp1.m at
http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/matlab/.
For this lab:
-
Extend the code in fixedp1.m until you are sure that the 3 digits after the decimal
point are correct.
-
Beginning with the command
fplot ('20*x-x^4',[1,3])
use the graphics in MATLAB/SCILAB/OCTAVE to find the root between 2 and 3 of the function 20*x-x**4
to 4 decimal places.
-
Suppose we want to solve x^2-7*x+10=0. Write code in MATLAB/SCILAB/OCTAVE to do this
using the fixed point iterations
-
x=(x^2+10)/7
-
x=7-10/x
-
x=(7*x-10)^0.5
in each case starting the iterations at (a) x=2.5 and at (b) x=4. If the process
seems to be converging, iterate until you have 3 digits after the decimal point.
©
NUI, Galway