% Script e15 Bode, Nichols, Nyquist plots
clear % removes all variables from the workspace
numG = [ 1280 640 ]; denG = [ 1 24.2 1604.81 320.24 16 ];
G = tf(numG,denG) %Create G(s) as a TF object
pause
disp('Make Bode plot directly from the bode command')
w = logspace(-2,3,100)'; % logarithmically-spaced points as column  
bode(G,w);
pause
disp('Make Nichols plot directly from the nichols command')
disp('  The encirclement direction is indicated')
nichols(G,w), grid, ngrid
axis([-270 0 -40 40])
pause
disp('Make Nyquist plot directly from the nyquist command')
nyquist(G);
grid, axis([-10 50 -30 30]), axis equal
  