MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】火烧眉毛 (https://www.labfans.com/bbs/showthread.php?t=220)

madai119 2007-05-23 11:41

【求助】火烧眉毛
 
x0=[0 3 5 7 9 11 12 13 14 15 ];
y0=[0 1.2 1.7 2.0 2.1 2.0 1.8 1.2 1.0 1.6 ];
x=0:0.1:15;
y1=lagr1(x0,y0,x);
y2=interp1(x0,y0,x);
y3=interp1(x0,y0,x,'spline');
subplot(3,1,1)
plot(x0,y0,'k+',x,y1,'r')
grid
title('lagrange')
subplot(3,1,2)
plot(x0,y0,'k+',x,y2,'r')
grid
title('piecewise linear')
subplot(3,1,3)
plot(x0,y0,'k+',x,y3,'r')
grid
title('spline')


有点错误,有哪位前辈给看一下 哪里错了
晚辈在这里多谢了

veryshowboy 2007-05-28 22:13

????????
 
??? Undefined command/function 'lagr1'.

Error in ==> Untitled at 4
y1=lagr1(x0,y0,x);

fiona_chen 2007-06-09 03:47

lagr1???
有这个Function吗?LZ自己编的?


所有时间均为北京时间。现在的时间是 12:53

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.