%  Example 4.2.  Generates the step response for a MIMO system.
clear
%  Define the transfer function model.
nu=[  0   1e5
    0.5e5 1e5];
de=conv([1 10],conv([1 -20*cos(4*pi/5) 100],[1 -20*cos(3*pi/5) 100]));
%  Compute the settling time and damping ratio for each mode.
poles=roots(de);
SettlingTime=-4*ones(size(poles))./real(poles)
damp(de)
%  Generate the step response.
t=0:.01:2;
[y,x]=step(nu,de,t);
%  Plot the step response.
set(0,'DefaultAxesFontName','times')
set(0,'DefaultAxesFontSize',16)
set(0,'DefaultTextFontName','times')
figure(1)
clf
plot(t,y(:,1),'r-',t,y(:,2),'r--')
xlabel('Time (sec)')
ylabel('Amplitude')
legend('{\ity}_1','{\ity}_2')
grid
