blob: 46a5faee88822734d6f2b9759e01f2f9b98c0a9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// bode p l o t %e^(-0.3*s)/(s*(1+s)
s=%s;
sys = syslin('c',1/(s*(1+s))) //%e^(-0.3*s) has no effect on bode plot
bode(sys)
show_margins (sys ,'bode' )
gm= g_margin (sys)
pm= p_margin (sys)
disp (gm ," g a in margin=")
disp (pm ," phas e margin=")
if (gm <=0 | pm <=0)
printf (" system is unstable ")
else
printf (" system is stable ")
end
|