Introduction - If you have any usage issues, please Google them yourself
function [Alfa,idz,odz,iodz,Poles_G]=decoupling_zeros(P,Q,R)
%% Finding Poles of System: |P(s)|=0
s=sym('s'); % Symbolic parameter
Alfa=roots(sym2poly(simplify(det(P))));
%% Finding Input Decoupling Zeros of System: idz
S_idz=[P Q];
[SMMilan_idz,P_idz,Z_idz]=SmithMacMilan(S_idz);
idz=roots(sym2poly(Z_idz));