编写的一段代码,sim函数在命令窗口能运行,但在m文件中运行就有错,代码如下
t=[0:0.01:10]';
m=30;
a=1;
x1=(m+0.075.*a)*cos(180.*pi.*10.*t);
x2=m*cos(300.*pi.*10.*t);
y=abs(x1)-abs(x2);
u=-1.*y/0.075;
end
[t,x,y] = sim('yibiao',[],[],[]);
sim函数中'yibiao'为模型名称,后面的[]表示都为默认值
错误提示为:Error using ==> sim
Error evaluating element '1' in list of external inputs specified in Configuration Parameters dialog. External inputs may be specified as either (a) a list of matrices and structures or (b) a single MATLAB expression or function.
求高人解答一下我该怎么修改,万分感谢!!