function Value = pvget(RespObj,Property)
%PVGET  Get values of public Response Object properties.
%
%   VALUES = PVGET(RespObj) returns the values of all public 
%   properties of RespObj in the cell array VALUES.
%
%   VALUES = PVGET(RespObj,PROPERTY) returns the value of the
%   single property with name PROPERTY.  The string property
%   must contain the true property name.
%   
%   See also GET.

%   Author(s): P. Gahinet, 7-8-97
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.7 $ $Date: 2000/06/14 20:08:43 $

ni = nargin;

% Get all PZPLOT-specific public properties and their values
PZPropNames = pnames(RespObj,'specific');
PZPropValues = struct2cell(RespObj);

% Get property value(s)
if ni==1
   % Get all property values
   Value = [PZPropValues(1:length(PZPropNames)) ; ...
         pvget(RespObj.response)];
else
   % Value of single property
   % Look among PZPLOT-specific properties
   imatch = find(strcmp(Property,PZPropNames));
   
   if isempty(imatch),
      % Look among parent properties
      Value = pvget(RespObj.response,Property);
   else
      % Other PZPLOT-specific property
      Value = PZPropValues{imatch};
   end
end
