
关于MATLAB中sim函数
编写的一段代码,sim函数在命令窗口能运行,但在m文件中运行就有错,代码如下t=[0:0.01:10]';m=30;a=1;x1=(m+0.075.*a)*cos(180...
编写的一段代码,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.
求高人解答一下我该怎么修改,万分感谢!! 展开
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.
求高人解答一下我该怎么修改,万分感谢!! 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
展开全部
直接sim('yibiao')呢
更多追问追答
追问
直接也不行
追答
你的Configuration Parameters的Input怎么设置的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?

2025-09-30 广告
上海艾羽信息科技有限公司是一家以CAE软件销售、技术咨询及服务,仿真咨询及规划布局为一体的高科技公司。作为ANSYS的合作伙伴,艾羽致力于将ANSYS推出的产品,通过业界性能颇佳、丰富的工程仿真软件产品组合帮助客户解决复杂的仿真难题。力求与...
点击进入详情页
本回答由VSH艾羽提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询