Select Page

Your Perfect Assignment is Just a Click Away

Starting at \$8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!

ENGR 120 Grossmont College Iterative Estimation Matlab Lab Report

Question Description

I’m working on a mathlab report and need support to help me understand better.

Lab 9 – Iterative Estimation

Introduction

Function and aesthetics are often governed by mathematics. Beautiful examples of this can be found in nature, from the growth pattern of plants to the feature placement on the human face. Read a low-tech blog post (Links to an external site.) about how Aston Martin uses the golden ratio in car design. The Golden Ratio, phi, is defined by:

?=1+5?2

$?\phantom{\rule{0ex}{0ex}}=\phantom{\rule{0ex}{0ex}}\frac{1+\sqrt{5}}{2}$

Equation 1. Exact Phi

One way that phi can be approximated is by taking the limit as n goes to infinity of a term in the Fibonacci sequence divided by it’s proceeding term:

?=limn??fnfn?1

$?\phantom{\rule{0ex}{0ex}}=\phantom{\rule{0ex}{0ex}}\underset{n??}{lim}\frac{{f}_{n}}{{f}_{n?1}}$

Equation 2. Estimated Phi

Be sure to read the module page on Printing to Log Files because it contains code on how to compute terms of the Fibonacci sequence. Similarly, e can be approximated by:

e=limn??(1+1n)n

$e\phantom{\rule{0ex}{0ex}}=\phantom{\rule{0ex}{0ex}}\underset{n??}{lim}{\left(1+\frac{1}{n}\right)}^{n}$

Equation 3. Estimated E

We will use our new input and output tools to create an iterative estimation program for both e and phi and compare our estimates to the true values.

Procedure

As usual, create a script, include a comment at the top explaining the purpose of the script, your name, and the date it was created.

1. Use the menu function to ask the user if they would like to estimate e or phi. Use the input function to prompt the user to select a desired accuracy (tolerance) between .1 to .01. Include error checking to ensure the user input corresponds to your desired format. See the page on Input Error Checking for an example of how to do this. Use a conditional or switch statement to select between the two estimation functions that you will write (see below).

2. To write your function to estimate e, create a function that accepts as input the user’s desired tolerance and outputs the estimate of e and the number of iterations required to meet the desired accuracy. Your function header will look like: function [myE, numIters] = estE(tol). Use the limit equation above for large n and compare the result to MATLAB’s built-in value for e. While the absolute value of the difference between e and your estimated e is greater than the tolerance, continue looping and increasing n.

3. Use a similar method to estimate phi. Since MATLAB has no built-in constant for phi, create your own true phi using Equation 1 above.

4. Create a text file to keep track of your progress at each iteration with the fprintf command (you may have to print every 100 iterations or even 1000 iterations if it takes a long time to reach the desired accuracy). Report the iteration, the estimated value and the absolute value of the difference between the estimated and true values at each step. Here’s a sample output:

After 133 iterations, estimated e is 2.708133 and error is 0.010149.
After 134 iterations, estimated e is 2.708208 and error is 0.010074.
After 135 iterations, estimated e is 2.708282 and error is 0.010000.

Turn-in Instructions

You will need to submit .m files for each function you define, main.m, estE.m and estPhi.m as well as your text log file. Each .m file should include your name and function description in comments. Upload your files via Canvas. Let me know if you have any questions!

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Our Service Charter

1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.