function Comp = zpk(CompData)
%ZPK   Get ZPK model of compensator.

%   Author(s): P. Gahinet
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/14 20:17:57 $

% Get pole/zero data
% REVISIT: merge
ZPData = getpz(CompData); Zeros=ZPData{1}; Poles=ZPData{2};

% Get gain data for RLOCUS format
GainData = convertgain(CompData,CompData.Format,'ZeroPoleGain');

% Return ZPK model
Comp = zpk(Zeros,Poles,GainData.Sign*GainData.Magnitude,CompData.Ts);
     
