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 /1340/CH6/EX6.3 | |
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 '1340/CH6/EX6.3')
-rwxr-xr-x | 1340/CH6/EX6.3/6_3.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/1340/CH6/EX6.3/6_3.sce b/1340/CH6/EX6.3/6_3.sce new file mode 100755 index 000000000..847ad066b --- /dev/null +++ b/1340/CH6/EX6.3/6_3.sce @@ -0,0 +1,27 @@ +
+clc;
+//stability via reversing coefficients
+s = poly(0,'s');
+tf = syslin('c',10/(s^5+2*s^4+3*s^3+6*s^2+5*s+3));
+deno = denom(tf);
+coef = coeff(deno);
+
+//reversing coefficients of tf
+tf2 = poly([coef(6) coef(5) coef(4) coef(3) coef(2) coef(1)],"s","coeff");
+disp(tf2);
+x = routh_t(tf2);//using routh_t function to generate the routh table
+disp(x);
+c = 0;
+for i=1:length(coef)
+ if(x(i,1)<0)
+ c = c+1;
+ end
+end
+if (c>=1)
+ printf("system is unstable");
+ else printf("system is stable")
+
+end
+//since there is sign change in the first column of the table
+// the system is unstable
+//note: the first column does not contain any zeroes
|