📄 example1.m
字号:
% 算例1
clf;
A=[1 -0.5 0.7];
B=[0 1 0.5];
th0=poly2th(A,B);
u=idinput(300,'rbs');
y=idsim([u,randn(300,1)],th0);
%
z=[y u];
ir=cra(z);
th=arx(z,[2 2 1]);
%
imp=[1;zeros(19,1)];
irth=idsim(imp,th);
%
subplot(211)
plot(ir,'--');
hold on
plot(irth,'r')
legend('相关分析','ARX 建模')
title('impulse responses')
%
subplot(212)
plot(cumsum(ir),'--');
hold on
plot(cumsum(irth),'r')
legend('相关分析','ARX 建模')
title('step responses')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -