blob: 1dd56abae0632dd41ecac5a3c18eb80c085ef829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
s=%s;
P=s^3+6*s^2+11*s+6;
routh=routh_t(P)
disp(routh)
r=coeff(P)
n=length(r)
c=0;
for i=1:n
if (routh(i,1)<0)
c=c+1;
end
end
if(c>=1)
printf("system is unstable")
else printf("system is stable")
end
|