Write a script that will loop through values of n until the


Students are expected to submit properly commented script files that solve the problem stated. 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 Solving)

Problem 1:

Loops and Vectorized Code The inverse of the mathematical constant e can be approximated as follows

1/e ≈ (1 - 1/n)n

Write a script that will loop through values of n until the difference between the approximation and the actual value is less than 0.0001. The script should then print the built in value of el and the approximation to four decimal places, and also print the value of n for such accuracy.

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Write a script that will loop through values of n until the
Reference No:- TGS01354214

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)