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

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

  Write a matlab that given a sequence of samples

Write a MATLAB or Octave program that, given a sequence, f[k], of samples in the time domain, calculates a filtered output y[k], given by the formula y[k]=-a_2[k-1]-a_1y[k-2]-a_0y[k-3]+b_3f[k]+b_2f[k-1]+b_1f[k-2]+b_0f[k-3].

  Determine the average heat transfer coefficients over l 2

water at an average temperature of 47 ordmc and with a flow rate of 0.02 kgs flows through a 2 cm diameter tube which

  Filtering – biomedical application

Prepare a filter that removes noise produced by electronic medical equipment.

  Calculate the integration along the given path

define the integrand using the given definition as Integrand - Find a parametric representation of C using Matlab

  Produce a capital with a modern or a traditional technology

Credit is allocated only to modern sector if and only if R

  The system is released from rest with the angle theta 90

the system is released from rest with the angle theta 90 degrees. determine theta dot when theta reaches 60 degrees.

  Create functions in file

Create Functions in File and how to code this function - Declare function inputs, and outputs

  Parking in garage using matlab

In matlab: parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour.

  A volume 10 in long 5in wide and 05 in thick is to be

a volume 10 in. long 5in wide and 0.5 in. thick is to be removed by face milling cutter that is 3in. diameter and has 6

  Ilab overview

you will develop a policy statement and the processes and procedures that can be used to drive the design, implementation, and maintenance of a wireless network in a SOHO (small office, home office) setting.

  Write a script that will loop through values of n

Write a script that will loop through values of n until the difference between the approximation and the actual value is less than 0.0001.

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