%Frequency Response Example 
% over frequencies from 10**w1 to 10**w2
w1=-2;w2=2
K=1;
Num =[K*12];
Den = conv([1 1], conv([1 2],[1 3]));
%Gc = tf([1], [1 0])
%Gc = tf([0.33], [1 0])
%Gc = tf([0.23], [1 0])
Gc = tf([1 0.4], [1 0])
Gp = tf(Num,Den)
G = series(Gc,Gp)
%bode(Gp,logspace(w1,w2)); hold on; grid on
%bode(Gc,logspace(w1,w2)); hold on;
figure(1)
bode(G,logspace(w1,w2));hold on; grid on
margin(G)

fsys=feedback(Gc*Gp,1);hold on; grid on
figure(2)
step(fsys)

