diff options
Diffstat (limited to '257/CH8/EX8.27/example_8_27.sce')
-rw-r--r-- | 257/CH8/EX8.27/example_8_27.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/257/CH8/EX8.27/example_8_27.sce b/257/CH8/EX8.27/example_8_27.sce new file mode 100644 index 000000000..d1a4ff496 --- /dev/null +++ b/257/CH8/EX8.27/example_8_27.sce @@ -0,0 +1,27 @@ +s=%s
+//P=s^4+2*s^3+3*s^2+s+1
+s'=%s
+P=(s'-1)^4+2*(s'-1)^3+3*(s'-1)^2+(s'-1)+1 //putting s=s'-1
+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("there are 2*%d roots to the right of s=-1",c) //2 terms with negetive signs implies 4 sign changes//
+ else printf("system is stable")
+ end
+
+F=(s'-0.5)^4+2*(s'-0.5)^3+3*(s'-0.5)^2+(s'-0.5)+1
+disp(routh_t(F))
+r=coeff(F)
+rouths=routh_t(F)
+n=length(r)
+
+ printf("there are 2 sign changes.so there are 2 roots to the right of s=-0.5")
+
\ No newline at end of file |