Question

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 0
Add a comment Improve this question Transcribed image text
Answer #1

clc
clear all
close all
x=[0.1,0.15,0.2,0.3,0.35,0.5,0.75];
y=[4,1,1.2,2.1,2.0,2.5,2.5];
C=polyfit(x,y,6);
xx=0.1:0.01:0.75;
yy=polyval(C,xx);
plot(xx,yy,x,y,'or');

Add a comment
Know the answer?
Add Answer to:
2. Consider interpolating the data (x0,yo), . . . , (x64%) given by Xi | 0.1...
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
  • Consider polynomial interpolation of the function f(x)=1/(1+25x^2) on the interval [-1,1] by (1) ...

    Consider polynomial interpolation of the function f(x)=1/(1+25x^2) on the interval [-1,1] by (1) an interpolating polynomial determined by m equidistant interpolation points, (2) an interpolating polynomial determined by interpolation at the m zeros of the Chebyshev polynomial T_m(x), and (3) by interpolating by cubic splines instead of by a polynomial. Estimate the approximation error by evaluation max_i |f(z_i)-p(z_i)| for many points z_i on [-1,1]. For instance, you could use 10m points z_i. The cubic spline interpolant can be determined in...

  • Problem 2. Given the data points (xi. yi), with xi 2 02 4 yil 5 1 1.25 find the following interpo...

    Problem 2. Given the data points (xi. yi), with xi 2 02 4 yil 5 1 1.25 find the following interpolating polynomials, and use MATLAB to graph both the interpolating polynomials and the data points: a) The piecewise linear Lagrange interpolating polynomialx) b) The piecewise quadratic Lagrange interpolating polynomial q(x) c) Newton's divided difference interpolation pa(x) of degree s 4 Problem 2. Given the data points (xi. yi), with xi 2 02 4 yil 5 1 1.25 find the following...

  • I just need the last part. T_3min HW7_3 Ball bearings are hardened through a process known...

    I just need the last part. T_3min HW7_3 Ball bearings are hardened through a process known as quenching-submersion of the heated ball bearing in oil or water in order to cool it rapidly. The data below represent the temperature of the ball at various points in the cooling process | time (sec) 0 30 | 60 | 150 | 240 Temp (C) 800 457 269 | 79 46 Plot the data, along with a) interpolating polynomial, (use polyfit and polyval)...

  • 2. More on Cubic Splines Consider the data Xi : 1 2 3 4 Yi :...

    2. More on Cubic Splines Consider the data Xi : 1 2 3 4 Yi : 18 27 64 a. Construct the cubic interpolant, i.e., find the cubic polynomial p that satisfies p(xi) = Yi, i = 1,2,3,4 and draw its graph. b. Construct the interpolating natural cubic spline and draw its graph. c. Comment on your results.

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

  • 1. Consider the Runge function, f:IH 1/1+25r). (a) Use your Lagrange interpolation code (from the...

    1. Consider the Runge function, f:IH 1/1+25r). (a) Use your Lagrange interpolation code (from the previous worksheets) to approximate f using 10, 20, 30, and 40 equispaced points from -1 and 1 (inclusive). Make a (single) plot comparing these four approximations with the (exact) function f. Use a legend to help distinguish the five curves. Intuitively, increasing the number of sample points should give a 'better' approximation. Does it? (A qualitative answer is sufficient.) (b) Repeat Part (a) using piecewise...

  • interp1, polyfit, polyval, diff, trap, quad 1 INTERPOLATION (2 PTS) You did an experiment and obtained the followin...

    interp1, polyfit, polyval, diff, trap, quad 1 INTERPOLATION (2 PTS) You did an experiment and obtained the following data set 90 x 10 20 30 60 70 80 100 60 82 111 140 167 198 200 220 Y 23 45 Create the x and y vectors to represent the above data and use the interpl command to find the interpolation result for the following questions 1. Use linear interpolation to approximate the value of y when x=15 2. Use cubic...

  • Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble,...

    Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble, you wil interpolate the function h(x) = tanh(10x) in I [a, b, through n datapoints (xi, hx with equidistant nodes for several values of n, and observe the behavior of the interpolating polynomial as n increases. You should use the pair of functions polyfit and polyval In your prob40: (a) Interpolate the function tanh(10x) in [-1,1] using a uniform grid of n nodes, where...

  • Project 2: (Data fitting-interpolating) Write a code that uses Matlab to read the data form an...

    Project 2: (Data fitting-interpolating) Write a code that uses Matlab to read the data form an excel file and try to fit the data to a polynomial of degree n, and then. Write down the analytical function that represent the data. Calculate the rms-error between the actual data and the fitted data. Plot the original data and the fitted data in one figure using the proper title and legends

  • Consider the following data table: 0 2i = 0.2 0.4 f(xi) = 2 2.018 2.104 2.306...

    Consider the following data table: 0 2i = 0.2 0.4 f(xi) = 2 2.018 2.104 2.306 0.6 0.2 and 23=0.4 is The linear Lagrange interpolator L1,1 (2) used to linearly interpolate between data points 12 (Chop after 2 decimal places) None of the above. -2.50x+0.20 -5.00x+2.00 -5.00x+2.00 5.00x-1.00 Consider the following data table: 2 Ti = 0 0.2 0.4 0.6 f(x) = 2.018 2.104 2.306 0.2 and 23 = 0.4, the value obtained at 2=0.3 is Using Lagrange linear interpolation...

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