% Coefficienti
a1=.60; b1=.20;
a2=.80; b2=.15;
a3=.90; b3=.08;


% Matrici
A=[b1 0 0; a1 b2 0; 0 a2 b3];
B=[1;0;0];
C=[0 0 a3];
D=[0];
sys=ss(A,B,C,D,1);

% Simulazione
T=10;
y=lsim(sys,50*ones(T,1));

stairs(2001+(0:T-2),y(1:T-1));
title('y(k)')
grid
xlabel('passo k')

dc=dcgain(sys)
dc*50