報(bào)錯(cuò)代碼:
'''
t = [0:0.01:10];
sys = tf([8], [1 3 2]);
u = [t; 2*ones(size(t))]; % 輸入信號(hào)
y0 = 1; % 系統(tǒng)的初始狀態(tài)
y = lsim(sys, u, y0, t); % 系統(tǒng)輸出
plot(t, y);
grid on;
xlabel('t');
ylabel('r_{zi}(t)');
title('r_{zi}(t)=x(t)*h(t)\Delta=0.01');
'''
錯(cuò)因:
錯(cuò)誤使用 DynamicSystem/lsim (line 84)
When simulating the response to a specific input signal, the input
data U must be a matrix with as many rows as samples in the time
vector T, and as many columns as input channels.
用lsim函數(shù)求系統(tǒng)零輸入響應(yīng)時(shí)總報(bào)錯(cuò),不知道怎么修改了QAQ-1.jpg (31.62 KB, 下載次數(shù): 14)
下載附件
保存到相冊(cè)
2022-12-11 18:13 上傳
|