summaryrefslogtreecommitdiff
path: root/29/CH12/EX12.59/exa12_59.sce
blob: f63c58a721d90a14434522b072b56be9d8512a6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//caption:obtain_time_response
//example 12_59
//page 590
s=%s;
syms t
A=[-1 0;1 -1]
B=[0 1]'
x0=[1 0]'
[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)
r1=r*x0
X=r1+m
//for calculating zero state response
x=[0;0]
x(1,1)=ilaplace(X(1,1),s,t);
x(2,1)=ilaplace(X(2,1),s,t);
disp(x,"zero input response of the system,x(t)=");