Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

Write three separate MATLAB programs to approximate the sine curve between 0 and 2Π using

(a) Curve fitting by a polynomial curve of power 4;

(b) Newton's interpolating polynomial;

(c) Lagrange'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 sine curve at regular intervals and use these points as your data points for the curve fitting. Use the same set for each of the curves.

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 sine 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.

2. For each case, for one specific number of data points only (you decide that number) investigate the behaviour of the fitted curves if there are some errors in the data. You can manufacture the errors artificially by changing some (or all) of the sine 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 errors progressively; this means varying the bounds of the error magnitudes In each study. Again, study the variations qualitatively by graphical means. 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.)

3. What conclusion can you draw from the comparison between Newton's and Lagrange interpolation polynomials? Explain your findings.

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. Include printouts of your MATLAB programs in the report. (If I need to test your program, I will ask you for a softcopy separately.)

The above are all that you have to submit. But for those of you who fancy an extra challenge, fit a cubic spline to the curve, and perform the same analysis as above. You can obtain the tangent directions at the start and the end points of the spline from the tangent directions of the sine curve at the corresponding points.

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91698208
  • Price:- $110

Guranteed 48 Hours Delivery, In Price:- $110

Have any Question?


Related Questions in MATLAB

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Suppose that a student has the option of enrolling for a

Suppose that a student has the option of enrolling for a single elective during a term. The student must select a course from a limited list of options: "English, " "History, " "Biology, " "Computer, " or "Math." Constru ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As