summaryrefslogtreecommitdiff
path: root/1340/CH6/EX6.5/6_5.sce
blob: 1c930dbeddfa224bf9fb59b88b5139bf88cfe34a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc;
s = %s;
G = s^8+s^7+12*s^6+22*s^5+39*s^4+59*s^3+48*s^2+38*s+20;
x = routh_t(G);
disp(x);c = 0;
for i = 1:length(coeff(G))
    if(x(i,1)<0)
        c=c+1;
        end
    end
    
    if(c>=1)
        printf("poles in RHP,thus unstable");
     else printf("stable system") ;
     end