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 /104/CH5/EX5.12/5_12.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 '104/CH5/EX5.12/5_12.sce')
-rwxr-xr-x | 104/CH5/EX5.12/5_12.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/104/CH5/EX5.12/5_12.sce b/104/CH5/EX5.12/5_12.sce new file mode 100755 index 000000000..66458ac0f --- /dev/null +++ b/104/CH5/EX5.12/5_12.sce @@ -0,0 +1,22 @@ +//OCF form
+s=%s
+A=[1 2 1;0 1 3;1 1 1]
+B=[1;0;1]
+[row,col]=size(A)
+c=s*eye(row,col)-A
+x=det(c)
+r=coeff(x)
+M=[r(1,2) r(1,3) 1;r(1,3) 1 0;1 0 0]
+S=[B A*B A^2*B]
+disp(S,"controllability matrix=")
+if (det(S)==0) then
+ printf("system cannot be transformed into ccf form")
+else
+ printf("system can be transformed into ccf form")
+end
+P=S*M
+disp(P,"P=")
+Accf=inv(P)*A*P
+Bccf=inv(P)*B
+disp(Accf,"Accf=")
+disp(Bccf,"Bccf=")
\ No newline at end of file |