ctrb
Controllability matrix.
Syntax
CO = ctrb(SYS)
CO = ctrb(A, B)
Inputs
- SYS
 - State-space LTI object.
 - A
 - The state matrix (n x n), where n is the number of states.
 - B
 - The input matrix (n x p), where p is the number of inputs.
 
Outputs
- CO
 - The controllability matrix.
 
Example
A = [0.3 2;5 -0.6];
B = [.5 -2;3 -.8];
sys=ss(A, B, [], []);
Y=ctrb(sys)Y = [Matrix] 2 x 4
0.50000  -2.00000  6.15000  -2.20000
3.00000  -0.80000  0.70000  -9.52000
% uncontrollable number of states corresponding to the number of singular values below a threshold.
unco = length(A) - rank(X)Comments
The function computes the controllability matrix of a state-space system.