function [Apar,Bpar,Cpar,Dpar]= decmpo(P,A,B,C,D) % % Author: Nasser M. Abbasi, Northeastern University % % functionality: % % decompose state equation A,B,C,D into an observable/ % and a nonobservable one % % arguments: % P: IN, The transformation matrix . this is the matrix % returned to you from QDECMPO.M (for observability) % A: IN, the A matrix of the state equation % B: IN, the B matrix of the state equation % C: IN, the C matrix of the state equation % D: IN, the D matrix of the state equation % Apar: OUT, Apar= PA(inv(P)) % Bpar: OUT, Bpar= PB % Cpar: OUT, Cpar= CQ % Dpar: OUT, Dpar= D % if(nargin ~=5) error('Number of input arguments must be 5, P,A,B,C,D'); end [row,col]=size(A); if(row ~= col) error('Matrix A must be square'); end Q= inv(P); Apar= P*A*Q; Bpar= P*B; Cpar= C*Q; Dpar= D;