{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

E7_lecture23_F08_Interpolation_MKF

# E7_lecture23_F08_Interpolation_MKF - DENSITY OF WATER...

This preview shows pages 1–2. Sign up to view the full content.

P l i l I t l ti Polynomial Interpolation DENSITY OF WATER 3 Temperature, ºC Density, g/cm 0 1.0000 25 0.9970 50 0.9881 75 0 9747 0.9747 100 0.9579 FUNCTION EVALUATION f(x) y 6 y y 5 y 1 3 x 0 x 1 x 2 x 4 x 5 x 6 x 3 interpolation LINEAR INTERPOLATION f(x) (x i 1 y i 1 ) i+1 ,y i+1 (x y ) (x,y) x 0 (x i ,y i ) i 1 i i i y y y x x y i 1 i x x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
PIECEWISE LINEAR INTERPOLATION f(x) y 6 y y 5 y 1 3 x 0 x 1 x 2 x 4 x 5 x 6 x 3 PIECEWISE LINEAR INTERPOLATION load xydata; plot(x y 'o') plot(x,y, o ) hold on n = 10; % number of points between nodes for i = 1:length(x)-1 xplot = linspace(x(i),x(i+1),n); yplot = ( (y(i+1)-y(i))/(x(i+1)-x(i)) ) yplot = ( (y(i+1) y(i))/(x(i+1) x(i)) ) *(xplot-x(i))+y(i); plot(xplot,yplot,'r') hold on
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

E7_lecture23_F08_Interpolation_MKF - DENSITY OF WATER...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online