Students are expected to submit properly commented script files that solve the problem stated. Do not submit your figure files. Your script files should automatically generate any figures required. |
For each of the problems below, I want you to document the following:
1. Identify the problem statement 2. Define the inputs and outputs to each problem 3. Show a pseudo code design of the solution 4. Show that you have tested your MATLAB code appropriately
All of this should be documented separately from the MATLAB code in a Word document (.doc or .docx) or an Adobe Acrobat file (.pdf). Please don’t use any other formats.
Problem 1 The value of cos(x) can be approximated using a Maclaurin series
(recall that the symbol ! stands for factorial).
Using a loop, calculate cos(x) to within a precision of 0.001. That is, add terms to the summation until the change in the calculated cosine is less than or equal to 0.001.