|
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
查看全部评分
-
|