Professional Documents
Culture Documents
Clear CLC Syms A (-1 1 0 0 0 0 - 1 1 0 0 0 0 - 1 0 0 0 0 0 - 1 1 0 0 0 0 - 1) B (0 0 0 0 A B 0 0 C D) P Length (A) R B
Clear CLC Syms A (-1 1 0 0 0 0 - 1 1 0 0 0 0 - 1 0 0 0 0 0 - 1 1 0 0 0 0 - 1) B (0 0 0 0 A B 0 0 C D) P Length (A) R B
Clear CLC Syms A (-1 1 0 0 0 0 - 1 1 0 0 0 0 - 1 0 0 0 0 0 - 1 1 0 0 0 0 - 1) B (0 0 0 0 A B 0 0 C D) P Length (A) R B
clear all
clc
syms a b c d
A = [-1 1 0 0 0; 0 -1 1 0 0; 0 0 -1 0 0; 0 0 0 -1 1; 0 0 0 0 -1];
B = [ 0 0; 0 0; a b; 0 0; c d];
p = length(A);
R = B;
% Reachability matrix
for i = 1: length(A)-1
R = [R A^i*B];
end
R
Det_R = det(R(:,1:p))
Det_R_ = det(R(:,1+p:end))
Reduced_R = rref(R)
Det_R =
Reduced_R =
clear all
clc
syms a b c d
A = [-1 1 0 0 0; 0 -1 1 0 0; 0 0 -1 0 0; 0 0 0 -1 1; 0 0 0 0 -1];
B = [ 0 0; 0 0; a b; 0 0; c d];
p = length(A);
R = B;
% Reachability matrix
for i = 1: length(A)-1
R = [R A^i*B];
end
R
Det_R = det(R(:,1:p))
Det_R_ = det(R(:,1+p:end))
Reduced_R = rref(R)
Det_R =
Reduced_R =