Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [-2 -1 0 1 2]
- -8 3 -5 6 6]
- a polyfit (x, y, 4)
- x1 linspace (-2,2)
- yl polyval (a,x1)
- %Lagrange interpolation
- 1
- t = [ 00102091 ]
- al polyfit (t,x, 4)
- a2 polyfit (t,y, 4)
- t1 linspace (0,1)
- x2 polyval (al, t1)
- y2= polyval (a2, t1)
- plot (x2,42, xl, yl,X,Y,'*')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement