求助:matlab中用lsim求任意输入的响应曲线时报错。

n=[0.01,3];d=[1.33/10^4,0.028,3];sys=tf(n,d);t=0:0.005:2;u=cos(t)/sin(t);[y,t]=lsim(s... n=[0.01,3];d=[1.33/10^4,0.028,3];
sys=tf(n,d);
t=0:0.005:2;
u=cos(t)/sin(t);
[y,t]=lsim(sys,u,t);plot(t,y);hold;plot(t,u,'r')

Error using ==> lti.lsim at 81
When simulating the response to a specific input signal, the input data U must be a matrix of real values with at least two
rows (samples) and without any NaN or Inf.
Error in ==> test at 6
[y,t]=lsim(sys,u,t);plot(t,y);hold;plot(t,u,'r')

我把输入改成u=cos(t)+sin(t);就完全没问题。但是乘或除就报错。为啥?
展开
 我来答
若以下回答无法解决问题,邀请你更新回答
ruifengcao
2012-08-06 · TA获得超过9496个赞
知道大有可为答主
回答量:3579
采纳率:33%
帮助的人:2351万
展开全部
你的u里面有无穷大的数,不能仿真
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式