summaryrefslogtreecommitdiff
path: root/773/CH17/EX17.23
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /773/CH17/EX17.23
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '773/CH17/EX17.23')
-rwxr-xr-x773/CH17/EX17.23/17_23.sci35
1 files changed, 35 insertions, 0 deletions
diff --git a/773/CH17/EX17.23/17_23.sci b/773/CH17/EX17.23/17_23.sci
new file mode 100755
index 000000000..20a365918
--- /dev/null
+++ b/773/CH17/EX17.23/17_23.sci
@@ -0,0 +1,35 @@
+//function//
+A=[-2 0;1 -1]
+B=[0;1]
+x=[0;0]
+disp(x,"x(t)=')
+s=poly(0,'s');
+[Row Col]=size(A) //Size of a matrix A
+m=s*eye(Row,Col)-A //sI-A
+n=det(m) //To Find The Determinant of si-A
+p=inv(m) ; // To Find The Inverse Of sI-A
+syms t s m;
+disp(p,"phi(s)=") //Resolvent Matrix
+t=(t-m)
+q=eval(q) //At t=t-m ,evaluating q i.e phi(t-m)
+//Integrate q w.r.t m (Indefinite Integration)
+r=integ(q*B,m)
+m=0 //Upper limit is t
+g=eval(r) //Putting the value of upper limit in q
+m=t //Lower Limit is 0
+h=eval(r) //Putting the value of lower limit in q
+y=(h-g);
+disp(y,"y=")
+printf("x(t)= phi(t)*x(0) + integ(phi(t-m)*B) w.r.t m from 0 t0 t \n")
+//x(t)=phi(t)*x(0)+integ(phi(t-m)*B)w.r.t m from 0 t0 t
+y1=(q*x)+y;
+disp(y1,"x(t)=")
+// CONTROLABILITY OF THE SYSTEM
+Cc=cont_mat(A,B);
+disp(Cc,"Controlability Matrix=")
+//To Check Whether the matrix(Cc)is singular i.e determint of Cc=0
+if determ(Cc)==0;
+printf("Since the matrix is Singular, the system is not controllable \n");
+else;
+printf("The system is controllable \n")
+end;