MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 初学者 请教高手指点 (https://www.labfans.com/bbs/showthread.php?t=10021)

591488385 2009-10-28 15:27

初学者 请教高手指点
 
按照书上程序输入:
t=0:0.001:2;
x=sin(2*pi*50*t)+sin(2*pi*100*t);
y=interp(x,4);
subplot(2,1,1);
stem(x(1:125));
subplot(2,1,2)
stem(y(1:250));


显示错误:
??? Attempt to execute SCRIPT interp as a function.

Error in ==> interp at 3
y=interp(x,4);

很多次都是这个错误,请指点一下。

ronymd 2009-10-29 05:14

回复: 初学者 请教高手指点
 
1 个附件
我为啥可以运行的呀??

591488385 2009-10-29 09:19

回复: 初学者 请教高手指点
 
我也是在m-file中编辑,然后run的啊。
应该不会是程序错误,书上的程序,难道我下的软件不全?或者在编辑之前还要其他操作?

haoxue 2009-10-31 18:22

回复: 初学者 请教高手指点
 
是啊,可以运行的,你再试试看


所有时间均为北京时间。现在的时间是 03:23

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