声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2200|回复: 2

[综合讨论] 请问lsim这个函数怎么用?

[复制链接]
发表于 2007-5-25 09:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
请问lsim这个函数怎么用?
我求解的是多自由度受迫振动系统,不知道用这个函数能否仿真?请高手指教!!!谢谢了!!
回复
分享到:

使用道具 举报

发表于 2011-4-13 14:24 | 显示全部楼层
回复 1 # gxc8208 的帖子

doc lsim
发表于 2011-4-13 15:19 | 显示全部楼层
lsim(SYS, u) 计算/绘制系统SYS对输入向量u的响应 。假设要对一个LTI系统进行分析,系统的传递函数如下:
                5s
H(s) = ---------------
         s2 + 2s +101

clc;
clear;
num = [5 0]; %Define numerator polynomial
den = [1 2 101]; %Define denominator polynomial
t = linspace(0, 10, 401); %Define a time vector
u = cos(2*pi*t); %Compute the cosine input function
[y, x] = lsim(num, den, u, t); %Compute the cosine input function
plot(t, y, 'r', t, u, 'b'); %Plot the output in red and the input in blue
xlabel('Time(s)');
ylabel('Amplitude');


评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-13 15:11 , Processed in 0.060966 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表