function [Gds32 Gdm32 Gdms32]=gmsd32(Gd32)

ztot=zero(Gd32); ptot=pole(Gd32);
z=ztot(find(ztot>0)); p=ptot(find(ptot>0));
nz=length(z); np=length(p);

s=TF('s');
b=1;a=1;     
for i = 1:np
    b=b*(s-p(i))/(s+p(i));
end;
for i = 1:nz
    a=a*(s+z(i))/(s-z(i));
end    

Gds32=minreal(tf(b*Gd32));Gdm32=minreal(tf(Gd32*a)); Gdms32=minreal(tf(b*Gd32*a));