MATLAB: How to display 2 different systems in the same axes using the SISO Tool

simulink

I would like to display 2 different systems in the same axes using the SISO Tool (similar to 'hold on' in standard MATLAB figures)

Best Answer

Here is some example code which shows how to realize this:
% Two examples of LTI systems:
tf1 = tf([1 2],[4 2 1]);
tf2 = tf([1 1],[7 1]);
ltiview
% Go to File->Import... and choose the appropriate LTI systems
% (tf1 und tf2 in this case)
% Or create an array of LTI systems:
mysys(:,:,1)=tf1;
mysys(:,:,2)=tf2;
ltiview(mysys)
% In the LTI Viewer you can switch between the different 'Plot Types'
% (e.g. using the right mouse button).
% But there doesn't exist an 'Root Locus' type.
% Furthermore you can call the single plots using:
figure
rlocus(mysys)
figure
bode(mysys)
figure
step(mysys)
figure
nichols(mysys)
figure
nyquist(mysys)
% Or the single systems (not as array) - for example:
figure
rlocus(tf1,'b')
hold on
rlocus(tf2,'r')
figure
bode(tf1,'b')
hold on
bode(tf2,'r')
% ...