This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (x);” in-between the ﬁrst and second lines above). Monitor the
error and try to reduce it as much as possible (reduce it to smaller than 0.01, at least).
(Hint: Think about the error formula to see how to reduce it.) You may want to keep
record of your trails by keeping the code that generates the nodes as comments in the
3. Did you ﬁnd any tricks to reduce the error?
4. Save the best error value and the nodes as a MAT ﬁle by using the command “save
XXXXXXXX E x”, where XXXXXXXX is your matriculation number. Upload the ﬁle
XXXXXXXX.mat to IVLE under the folder Lab2 and paste the value of the error (e.g.
1.12345689012345e-001) into the comment box in the uploading screen. Task 2
1. Open a new M-ﬁle and save it as “ncspline.m” (natural cubic spline). In the following
steps, type the lines into the M-ﬁle and save the ﬁle again after Step 14.
View Full Document
This document was uploaded on 10/10/2013.
- Fall '13
- Numerical Analysis