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 /29/CH7/EX7.5.3/exa7_5_3.sce | |
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 '29/CH7/EX7.5.3/exa7_5_3.sce')
-rwxr-xr-x | 29/CH7/EX7.5.3/exa7_5_3.sce | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/29/CH7/EX7.5.3/exa7_5_3.sce b/29/CH7/EX7.5.3/exa7_5_3.sce new file mode 100755 index 000000000..4f01a0671 --- /dev/null +++ b/29/CH7/EX7.5.3/exa7_5_3.sce @@ -0,0 +1,31 @@ +//caption:stability_using_Routh-hurwitz_criterion
+//example 7.5.3
+//page 203
+s=%s;
+A=s^5+4*1.5*s^4+4*s^3+4*s^2+5*s+10;
+C=2*s+5;
+CL=A/C;
+disp(CL,"C(s)/R(s)=");
+disp('=0',A,"characteristics eq is:")
+b=coeff(A)
+n=length(b)
+B=routh_t(A)
+disp(B,"routh table:");
+c=0;
+r=1;
+for(i=1:n)
+ if(B(i,1)<0)
+ c=c+1;
+ if(i==n & B(n,1)<0)
+ r=r;
+ else
+ r=r+1;
+ end
+ end
+end
+if(c>=1)
+ printf("system is unstable\n");
+else("system is stable " );
+end
+mprintf('no. of roots with positive real parts=%d',r);
+
|