Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
MATLAB Programs for Approximating Sine Curve using Curve Fitting
Answered

Description

Write three separate MATLAB programs to approximate the sine curve between 0 and 2π using curve fitting by
(a) a polynomial curve of power 4;
(b) a cubic spline;
(c) Lagrange’s interpolating polynomial or Newton’s interpolating polynomial.
You may refer to the textbook (Numerical Methods for Engineers by Chapra and Canale) for the algorithms, but I expect that you can work that out yourself given the lecture materials.

For each of the three cases, you should generate points on the curve at regular intervals and use these points as your data points for the curve fitting. Use the same set for each of the three approximations.
1. For each case, investigate the quality of the fitting with varying number of data points. You can study that qualitatively by plotting the original curve on top of the fitted curves, together with the curve of the difference between the two. Compare the three results and comment on your observations. Use at least three different numbers of data points. You can choose your own numbers. But be sensible, use numbers that are not too low and not too high. (Anything up to the power of the curve is too low; anything beyond 100 is too high.)

For the case of the cubic spline, you may consider the use of “natural splines” which has zero curvature at the free ends of the curve (curvature is a function of the second derivative of the curve). You can use this as a part of the boundary conditions of the curve.
2. For each case, for one specific number of data points only (you decide that number) investigate the behaviour of the fitted curves when there are some errors in the input data. You can manufacture the errors artificially by changing some (or all) of the original values slightly for the given angles. This error should be random, and therefore different for different points. Your investigation should be systematic, by studying different error magnitudes progressively; this means varying the bound of the error magnitude in each study. Comment on the results. (This can be an endless investigation if you are to vary the data many times. So let’s keep it to three.)

You should produce a report showing your results and commenting on the above investigations, supported by graphical outputs. Of course, your report should show the data you use for every case.
Please submit your MATLAB programs through the Assignment page in the course site. 

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close