summaryrefslogtreecommitdiff
path: root/1151/CH8/EX8.11/example11.sce
blob: 142e3c5d993f35f4ea13fcc9f0458983fc8b67b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
A =[-0.5 0;0 -2]
B =[0;1]
C=[0 1]
p=cont_mat(A,B)
disp (p," controllability matrix=");
d=det(p)
if d==0 
printf ("matrix is singular, so the system is uncontrollable");
else
printf ("system is controllable ");
end
g= obsv_mat (A,C);
disp (g," Observability Matrix=");
i= det(g)
if i ==0
printf ("matrix is singular, so the system is unobservable");
else
printf (" system is observable ");
end