mm245/ma260 lab3
http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/l3.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 October 25th, 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
Spend 30 minutes familiarizing yourself with polynomials in
OCTAVE/SCILAB/MATLAB.
You can search online for any of the tutorials or documentation on
MATLAB/SCILAB/OCTAVE,
or read
http://www.engin.umich.edu/group/ctm/basic/basic.html#polynomial or http://www.matrixlab-examples.com/polynomials.html.
You should study (and run) the code in
poly1.m at
http://www.maths.nuigalway.ie/~gettrick/teach/mm245/labs/matlab/
which is commented to explain its operation.
For this lab
Consider the function 3**x - x (for example, for x=2, the y value
is 3**2 - 2 = 7).
For the x values of 2, 3 and 4:
-
determine the corresponding y values.
-
calculate the Lagrange Interpolating polynomial (of degree 2) for
these 3 points.
-
determine the relative error at x=3.5
For the same function, calculate the Lagrange Interpolating polynomial (of degree 1)
if we only consider two points x=2 and x=3. Again, calculate the relative error at
x=3.5.
©
NUI, Galway