From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 29/CH9/EX9.10.11/exa9_10_11.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 29/CH9/EX9.10.11/exa9_10_11.sce (limited to '29/CH9/EX9.10.11/exa9_10_11.sce') diff --git a/29/CH9/EX9.10.11/exa9_10_11.sce b/29/CH9/EX9.10.11/exa9_10_11.sce new file mode 100755 index 000000000..c99f11012 --- /dev/null +++ b/29/CH9/EX9.10.11/exa9_10_11.sce @@ -0,0 +1,27 @@ +//caption:obtain_time_response +//example 9.10.11 +//page 394 +s=%s; +syms t +A=[0 1;-2 0] +B=[1 -1] +x0=[1 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 +//for calculating state transistion matrix +ip=[0 0;0 0] +i=1;j=1; +for i=1:2 + for j=1:2 + ip(i,j)=ilaplace(r(i,j),s,t); + j=j+1; + end + i=i+1; +end +disp(ip,"state transistion matrix,ip(t)="); +x=ip*x0 +y=x(1,1)-x(2,1) +y=simple(y) //output +disp(y,"time response of the system,y(t)="); -- cgit