%  Create a new system [a b c d] in the following way:
%        .  
%       |x1|   |A1  0 .. 0||x1|   |B1|
%       |x2| = | 0 A2    0||x2| + |B2|u
%       |..|   | ........ ||..|   |..|
%       |xn|   | 0  0 ..An||xn|   |Bn|
%
%       |y1|   |C1  0 .. 0||x1|   |D1|
%       |y2| = | 0 C2 .. 0||x2| + |D2|u
%       |..|   | ........ ||..|   |..|
%       |yn|   | 0  0 ..Cn||xn|   |Dn|
%
%
%   INPUTS: matrices NUME,DENE
%           np = number of poles
%

[dr,dc]=size(dene);

[a1,b1,c1,d1] = tf2ss(nume(1,:),dene(1,:));
[a1,b1]=d2c(a1,b1,1);

for j=2:dr
 [a2,b2,c2,d2] = tf2ss(nume(j,:),dene(j,:));
 [a2,b2]=d2c(a2,b2,1);
 [a1,b1,c1,d1] = mappend(a1,b1,c1,d1,a2,b2,c2,d2); 
end
[ax,bx,cx,dx,ay,by,cy,dy,aug]=ohkapp(a1,b1,c1,d1,1,np);
[ad,bd]=c2d(ax,bx,1);
ph = eig(ad)