Question

USING MATLAB

Develop a computer program to perform Cubic spline interpolation. The input for the computer program will be the data points,

0 0
Add a comment Improve this question Transcribed image text
Answer #1

program:

x = [0 1 2 5 3 6 0 7 8 10]; %x is vector of data point's x values i.e x1,x2,x3
y = [1 2 3 6 4 7 1 8 9 11]; %y is vector of data point's y values i.e y1,y2,y3
xx = 0: .5 : 10;
pp = spline(x,y,xx);
plot(x,y,xx,pp);

Output:

12 10 8 6 4 0 10

Add a comment
Know the answer?
Add Answer to:
USING MATLAB Develop a computer program to perform Cubic spline interpolation. The input for the computer program will be the data points, the point(s) that is (are) required to be interpolated. Test...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • matlab matlab For this problem you will test a few interpolation approaches for the application of generating interpolated data. We'll do this by interpolating data that is sampled from a k...

    matlab matlab For this problem you will test a few interpolation approaches for the application of generating interpolated data. We'll do this by interpolating data that is sampled from a known mathematical function. The same function can then be used to compute true values at the interpolated points to use in error Consider the following mathematical function (Runge's function): 1+25r2 Write a function mfile that uses this formula to generate a set of data use those points along approaches outlined...

  • Write a complete set of Matlab instructions that implements cubic spline interpolation on the following data...

    Write a complete set of Matlab instructions that implements cubic spline interpolation on the following data (assume clamped-end-condition). Your code should: a. Generate a single plot, over the range 0<= x <= 5, displaying: i. the individual data points ii. the generated spline function b. Predict the interpolated value at x = 0.5, x = 0.8 and x = 3.7 X у 0 1.7 1 0.3 2 1.8 3 0.4 4 2

  • 3D Cubic B-Spline Interpolation and Error Estimation Theme: Implement and study 3D Cubic Spline ...

    3D Cubic B-Spline Interpolation and Error Estimation Theme: Implement and study 3D Cubic Spline Interpolation Input: a set of points in 3D space (data(x,y,z)) Output: Spline, Spline data points and error, 3D graph that shows the original points and the Spline The major steps involved in the B-Spline Fitting and Error Estimation are as mentioned below: 1- Sample the data points from input data. 2- Interpolate to find the position of control points. 3- Use the B-Spline basis function to...

  • IN MATLAB Write a MATLAB function that can be used by a user to perform polynomial...

    IN MATLAB Write a MATLAB function that can be used by a user to perform polynomial interpolation using Lagrange Interpolation Method on a set of data. You should name your function as YourInitials_Lagrange_interpolation. 1. FUNCTION INPUT: . The input data pairs x and f(x) should be expressed as vectors and are used to construct the interpolation polynomials The interpolating data points/value The order of interpolating polynomials to be used. For this project you code should handle first order, second order...

  • matlab D [10 pts Consider following data points Groups a) Use linear interpolation method to fit...

    matlab D [10 pts Consider following data points Groups a) Use linear interpolation method to fit data. Use 'interp1 b) Fit data with a cubie spline. Use "spline e) Fit a 4h degree polynomial using "polyf Tools Help Make a figure for each of the interpolation methods. In each figure show data points using ocircle marks, a curve that eorresponds to the interpolation method

  • Using MATLAB Linear Interpolation: The following equation illustrates how to calculate an output for any input,...

    Using MATLAB Linear Interpolation: The following equation illustrates how to calculate an output for any input, using linear interpolation. The input must be within the bounds of the data set. The constants come from the data set; they are the nearest data points that bound the original input. (constants from data set--> y1, x1, y2) (output--> y) (input--> x) Create a MATLAB function file that calculates the linearly interpolated y-value (output) provided an x-value (input). The function should linearly interpolate...

  • A wind tunnel test conducted on an airfoil section yielded the following data between the lift...

    A wind tunnel test conducted on an airfoil section yielded the following data between the lift coefficient (CL) and the angle of attack (?): 12 1.40 16 1.71 20 1.38 de CL 0.11 0.55 0.95 You are required to develop a suitable polynomial relationship between ? and CL and fit a curve to the data points by the least-squares method using (a) hand calculations and (b) Matlab programming Hint: A quadratic equation (parabola) y(x)-aa,x +a x' can be used in...

  • Problem 5 (programming): Create a MATLAB function named lagrange interp.m to perform interpolation using Lagrange polynomials....

    Problem 5 (programming): Create a MATLAB function named lagrange interp.m to perform interpolation using Lagrange polynomials. Download the template for function lagrange interp.m. The tem Plate is in homework 4 folder utl TritonED·TIue function lakes in the data al nodex.xi and yi, as well as the target x value. The function returns the interpolated value y. Here, xi and yi are vectors while x and y are scalars. You are not required to follow the template; you can create the...

  • 2. Consider interpolating the data (x0,yo), . . . , (x64%) given by Xi | 0.1...

    2. Consider interpolating the data (x0,yo), . . . , (x64%) given by Xi | 0.1 | 0.15 | 0.2 | 0.3 | 0.35 | 0.5 | 0.75 yi 4.0 1.0 1.22.12.02.52.5 For all tasks below, please submit your MATLAB code and your plots. You can write all code in a single (a) Using MATLAB, plot the interpolating (6th degree) polynomial given these data on the domain .m-file [0.1,0.75] using the polyfit and polyval commands. To learn how to use...

  • 1. Runge's function is written as f(x) = 1 25r2 (a) Develop a plot of this function for the inter...

    1. Runge's function is written as f(x) = 1 25r2 (a) Develop a plot of this function for the interval from x =-1 to 1 using Matlab (no submission required). Develop the fourth-order Lagrange interpolating polynomial using equispaced function values corresponding to xi =-1,-0.5, 0, 0.5, and 1. (Note that you first need to determine the (a. ) pairs.) Use the polynomial to estimate f(0.9). (b) What is et? (c) Generate a cubic spline using the five data points from...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT