u = [1 -1 1; 0 -1 2; 0 0 1]

%

inv(u)

%

u * u

%

A = [-1 0 -1; -1 -1 0; 0 -1 -1]
B = [1; 0; 0]
C = [0 0 1]
D = [0]

%

K = [25 -166.9 1004.1]

%

N = 1 / ((C - D * K) * inv(-A + B * K) * B + D)

%

sys = ss(A - B * K, N * B, C - D * K, N * D)

%

step(sys)

%

stepinfo(sys)

%

syms s

%

C * inv(s * eye(3) - A) * B + D