Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- An Interpolation Process on the Roo... by ajer123 146 views
- Hermite by Nakul Surana 138 views
- D_V_A_N_JARCH by jesus_armandor 633 views
- Curve and surface interpolation and... by Alejandro_Cosin_A... 1709 views
- interpolation by 8laddu8 12923 views
- Spline approximation to the solutio... by CuteGirl174 24 views

403 views

277 views

277 views

Published on

POLYNOMIALS,CURVEFITTING, AND INTERPOLATION

No Downloads

Total views

403

On SlideShare

0

From Embeds

0

Number of Embeds

0

Shares

0

Downloads

10

Comments

0

Likes

2

No embeds

No notes for slide

- 1. BY Uday Saikia
- 2. >> p=[1 -12.1 40.59 -17.015 -71.95 35.88] >> r=roots(p) r= 6.5000 4.0000 2.3000 -1.2000 0.5000
- 3. 6x-2
- 4. p=polyfit(x,y,n) here p=A vector of the co-efficients of the polynomial that fits the data co- x=A vector with the horizontal ordinate of the data points y= A vector with the vertical co-ordinate of the data points n=Degree of polynomial
- 5. Here, ‘nearest’ : returns the value of the data point that is nearest to the yi = interpl (x, y, xi, ‘method’) interpolated point ‘linear’ : uses linear spline interpolation ‘spline’ : uses cubic spline interpolation yi = It is Interpolated value ‘pchip’ : uses piecewise cubic Hermite interpolation x = It is a vector with horizontal co-ordinate of the input data points y = It is a vector with vertical co-ordinate of the input data points xi = Horizontal co-ordinate of the interpolation point
- 6. x 0 1 2 y 1.0 -0.6242 -1.4707 3 4 5 3.2406 -0.7366 -6.3717
- 7. >> x=[0:1.0:5]; y=[1.0 -0.6242 -1.4707 3.2406 -0.7366 -6.3717]; xi=[0:0.1:5]; yilin=interpl(x,y,xi,'linear'); yispl=interpl(x,y,xi,'spline'); yipch=interpl(x,y,xi,'pchip'); yfun=1.5.^xi*cos(2*xi); subplot(1,3,1) plot(x,y,'o'xi,yfun,xi,yilin,'--'); subpolt(1,3,2) plot(x,y,'o',xi,yfun,xi,yispl,'--'); subplot(1,3,3) plot(x,y,'o',xi,yfun,xi,yipch,'--')
- 8. Mesh & Surface plots are created in three steps: *create a grid in the x-y plane *calculate the value of z at each point of the grid *create the plot
- 9. >> x=-1:0.1:3; >> y=1:0.1:4; >> [X,Y]=meshgrid(x,y); >> Z=X.*Y.^2./(X.^2+Y.^2); >> mesh(X,Y,Z) >> xlabel('x'); >> ylabel('y'); >> zlabel('z');

No public clipboards found for this slide

Be the first to comment