

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CMSC/AMSC 460 Fall 2007 Homework 2 Due Tuesday, October 2, before class begins 10 points
(1) (5) The program elephant.m fails when the x-coordinates of the points are not in order. Fix it so that it works properly in this case. (Hint: Matlab’s sort function will be useful.)
(2) (5) Add a fourth algorithm to elephant.m so that it also fits a Hermite cubic to the data.
For full credit: Hand in
If you hand in hardcopy, keep your program in case the TA tells you later that she wants to test it.
The documentation at the top of the function should provide basic infor- mation to help a potential user decide whether the software is of interest. It should include:
In-line documentation identifies the major sections of the code and pro- vides some detail on the method used. It is important in specifying the al- gorithm, identifying bugs, and providing information to someone who might need to modify the software in order to solve a slightly different problem. Note that the documentation should be an integral part of the code; in other words, it is not enough to include it in a separate document, because a potential user might not have access to that document.