function out = getpz(CompData)
%function [Zeros,Poles] = getpz(CompData)
%GETPZ  Returns vectors of poles and zeros.

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


if isempty(CompData.PZGroup)
    Zeros = zeros(0,1);
    Poles = zeros(0,1);
else
    Zeros = get(CompData.PZGroup,{'Zero'});
    Zeros = cat(1,Zeros{:});
    Poles = get(CompData.PZGroup,{'Pole'});    
    Poles = cat(1,Poles{:});
end

% REVISIT: return two output args when supported
out = {Zeros,Poles};
