summaryrefslogtreecommitdiff
path: root/46/CH29/EX29.1/Example29_1.sce
blob: 14ab3d8b2b0020496785c5f867e78d271726f7ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example 29.1
clc
syms t tau
A=[-1 1;0 -2]
B=[0;1]
x0=[-1;0]
printf("x1=Ax+Bu(t)")
//On solving given equation
//let X=exp(A*t)
X=[exp(-t) exp(-t)-exp(-2*t);0 exp(-2*t)]
//Y=exp(A*(t-tau))
Y=[exp(-(t-tau) ) exp(-(t-tau))-exp(-2*(t-tau));0 exp(-2*(t-tau))]
//From Eq.(29.4)
xt=X*x0+integ(Y*B,tau,0,t)