mm245/ma260 lab1


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




Read and execute the files graphical.m and fixedp1.m at http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/matlab/. For this lab:

  1. Extend the code in fixedp1.m until you are sure that the 3 digits after the decimal point are correct.
  2. 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.
  3. 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