Write three separate MATLAB programs to approximate the sine curve between 0 and 2π using curve fitting by a polynomial curve of power 4; a cubic spline; Lagrange’s interpolating polynomial or Newton’s interpolating polynomial.

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.

The assignment was attached and the lecture notes may help you.

Thank you.

Looking for solution of this Assignment?

WHY CHOOSE US?

We deliver quality original papers

Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay