summaryrefslogtreecommitdiff
path: root/29/CH12/EX12.57/exa12_57.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /29/CH12/EX12.57/exa12_57.sce
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 '29/CH12/EX12.57/exa12_57.sce')
-rwxr-xr-x29/CH12/EX12.57/exa12_57.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/29/CH12/EX12.57/exa12_57.sce b/29/CH12/EX12.57/exa12_57.sce
new file mode 100755
index 000000000..e647af62c
--- /dev/null
+++ b/29/CH12/EX12.57/exa12_57.sce
@@ -0,0 +1,19 @@
+//caption:obtain_time_response
+//example 12_57
+//page 586
+s=%s;
+syms t
+A=[0 1;-2 -3]
+B=[1 0]'
+x0=[0 0]'
+u=1/(s+1)
+[r c]=size(A);//size of matrix A
+p=s*eye(r,c)-A;//s*I-A where I is identity matrix
+q=det(p)//determinant of sI-A
+r=inv(p)//inverse of sI-A
+m=r*B*(1/(s+1));
+//for calculating zero state response
+x=[0;0]
+x(1,1)=ilaplace(m(1,1),s,t);
+x(2,1)=ilaplace(m(2,1),s,t);
+disp(x,"time response of the system,x(t)=");