diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /773/CH10/EX10.05.02 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '773/CH10/EX10.05.02')
-rwxr-xr-x | 773/CH10/EX10.05.02/10_05_02.sci | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/773/CH10/EX10.05.02/10_05_02.sci b/773/CH10/EX10.05.02/10_05_02.sci new file mode 100755 index 000000000..a8ccbd6c4 --- /dev/null +++ b/773/CH10/EX10.05.02/10_05_02.sci @@ -0,0 +1,21 @@ +//equation//
+s=%s;
+m=s^5+6*s^4+3*s^3+2*s^2+s+1
+r=coeff(m)
+n=length(r)
+routh=[r([6,4,2]);r([5,3,1])]
+routh=[routh;-det(routh(1:2,1:2))/routh(2,1),-det(routh(1:2,2:3))/routh(2,2),0]
+routh=[routh;-det(routh(2:3,1:2))/routh(3,1),-det(routh(2:3,2:3))/routh(3,2),0]
+routh=[routh;-det(routh(3:4,1:2))/routh(4,1),-det(routh(3:4,2:3))/routh(4,2),0]
+routh=[routh;-det(routh(4:5,1:2))/routh(5,1),0,0]
+c=0;
+for i=1:n
+if (routh(i,1)<0)
+c=c+1;
+end
+end
+if(c>=1)
+printf("system is unstable")
+else ("system is stable")
+end
+
|