summaryrefslogtreecommitdiff
path: root/1151/CH4/EX4.10/example10.sce
blob: 2e843ecff292f983fe0a8fe1fee87b50a9a22b99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 // bode p l o t
s=%s;
sys = syslin('c',1000/(s*(0.1*s +1)*(0.001*s +1)))
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