MATLAB: State space to transfer function conversion

control systemsstate-space

dx/dt = A x+ B q + E u
y = C x+ D q + F u
the above is a state space representation of my model
where x -states
u-input
q- disturbance /load
A,B,C,D,E,F corresponding coefficient matrices
how to convert this state space representation to transfer function

Best Answer

Your system can be written as
dx=C.x+B1.e % With e=[q;u] and B1=[B E]
y=C.x+D1.e % With D1=[D F]
Then Use ss2tf as usually.