Newtons and lagrange interpolation polynomials

Assignment Help MATLAB Programming
Reference no: EM13988353

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.

Reference no: EM13988353

Questions Cloud

Computerized diagnostic assemblies : A work cell is required to make 200 computerized diagnostic assemblies (for installation into hybrid automobiles) each day. The cell currently works an eight hour shift, of which seven hours is available for productive work. What is takt time for thi..
Magazine states the average number of cars per subscriber : A magazine states the average number of cars per subscriber family is 1.2. If 20% of the family subscribers have no cars, what is the average number of cars per family of those families, which have one or more cars?
Future state of the economy : The management of Gawain plc is evaluating two projects whose returns depend on the future state of the economy as shown below:
Calculate the firms break-even point in dollars : A firm sells two products. Product R sells for $20; its variable cost is $6. Product S sells for $50; its variable cost is $30. Product R accounts for 60 percent of the firm's sales, while S accounts for 40 percent. The firm's fixed costs are $4 mill..
Newtons and lagrange interpolation polynomials : What conclusion can you draw from the comparison between Newton's and Lagrange interpolation polynomials? Explain your findings.
Analyze in the american criminal justice system : Jeffrey MacDonald Case - Select a current events case, in the last ten years, to analyze in the American criminal justice system. The case should be one where a life sentence or death sentence was the outcome
Describe customer experience you have personally encounterd : Describe a customer experience you have personally encountered where the good or service or both were unsatisfactory (for example, defective product, errors, mistakes, poor service, service upsets, etc.) How might the organization have handled it bet..
Calculate the correlation between projects : The management of Gawain plc is evaluating two projects whose returns depend on the future state of the economy as shown below: The project (or projects) accepted would double the size of Gawain.
Neither alice''s nor bruce''s employer reimburses : Neither Alice's nor Bruce's employer reimburses for employee expenses. • The Smiths do not keep the receipts for the sales taxes they paid and had no major purchases subject to sales tax. • All members of the Smith family had health insurance coverag..

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Design the digital receiver system

Objective of the project is to design the digital receiver system of the 100-Base TX Ethernet provided in given that the transmitter is provided.

  Compute the output response

Write a MATLAB M-file to compute the output response y[n] of the 6-point MA filter to the input x[n]=5sin(pn/10 + p/4), for 0

  Type of study and phenomenon of interest

Summarize the type of study and phenomenon of interest, discuss whether the sample and population used were appropriate and Summarize results, limitations of results, conclusions, and applications.

  Compute the value of each piece of clothing

You decide to write a script in MATLAB that will compute the value of each piece of clothing.

  How much time passes from when the wheel was started from

a sharpening stone at rest is brought to 300 rpm over 2 mins. at that point a dull sword edge is placed against the

  Table of hurricane categories and associated wind speeds

Review the following table of Hurricane categories and associated wind speeds (miles per hour) and storm surge levels (feet above normal).

  Approximate the solution to the above initial value problem

1. dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Investigate a monte carlo type simulation for an ensemble

The purpose of this assignment is to investigate a Monte Carlo type Simulation for an ensemble average. We can perform a Mende Carlo simulation to calculate the ensemble average of a random process. Consider the Random Process as in Example

  Determines which member has the largest magnitude force

Determines which member has the largest magnitude force. Reports to the Command Window which member has the largest magnitude force and the value of the force in that member.

  Write a function called crazygrade

Write a function called CrazyGrade that will take in the string and flip the grades according to the specifications - Define the inputs and outputs to each problem

  Write a matlab program to multiply two matrices

Write a MATLAB program to multiply two matrices together. Do not use the MATLAB matrix multiplication function, A*B.

  Write a matlab program that produces the sum of square

Write a Matlab program that produces the sum of square of all the even numbers and cube of all the odd numbers between 1 to 100.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd