summaryrefslogtreecommitdiff
path: root/62/CH7/EX7.54/ex_7_54.sce
diff options
context:
space:
mode:
Diffstat (limited to '62/CH7/EX7.54/ex_7_54.sce')
-rwxr-xr-x62/CH7/EX7.54/ex_7_54.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/62/CH7/EX7.54/ex_7_54.sce b/62/CH7/EX7.54/ex_7_54.sce
new file mode 100755
index 000000000..8c280828b
--- /dev/null
+++ b/62/CH7/EX7.54/ex_7_54.sce
@@ -0,0 +1,19 @@
+clc;
+A=[1 2;0 3];
+B=[1;1];
+C=[1 -1];
+D=[0];
+Mc=[B A*B];
+if (det(Mc)<>0) then
+ disp("and is controllable",rank(Mc),"Mc has a rank of")
+else
+ disp("and is uncontrollable",rank(Mc),"Mc has a rank of");
+end
+Mo=[C;C*A];
+if (det(Mo)<>0) then
+ disp("and is observable",rank(Mo),"Mo has a rank of")
+else
+ disp("and is unobservable",rank(Mo),"Mo has a rank of");
+end
+Hs=ss2tf(syslin('c',A,B,C,D));
+disp(Hs,"H(s)=")