I have a transfer function (From Ogata's Modern Control Engineering)
$$\frac{s+2.5}{(s+2.5)(s-1)}$$
and the theory says the system has a pole zero cancellation and is uncontrollable.
They said that a state space rep of this transfer function has A and B matrix of:
$$ A = \begin{bmatrix} 0 & 1 \\ 2.5 & -1.5 \end{bmatrix} \ \text{and} \ B = \begin{bmatrix} 1 \\ 1 \end{bmatrix} $$
Using rank(ctrb(A,B))
in MATLAB, the result is not equal to the dimension of the state space so it not controllable.
So I got curious and used tf2ss in MATLAB and got another state space rep:
$$ A = \begin{bmatrix} -1.5 & 2.5 \\ 1 & 0 \end{bmatrix} \ \text{and} \ B = \begin{bmatrix} 1 \\ 0 \end{bmatrix} $$
Using rank(ctrb(A,B))
in MATLAB, I got a value equal to the dimension of the state space so it is controllable.
What have I misconceived? (and could someone teach me on how to make matrices in Markdown for the above?)