function [Props,AsgnVals,DocInd] = pnames(RespObj,flag)
%PNAMES  All public properties and their assignable values
%
%   [PROPS,ASGNVALS] = PNAMES(RESPOBJ) returns the list PROPS of all
%   public properties of RESPOBJ (including the parent properties), 
%   as well as the assignable values ASGNVALS for these properties 
%   Both PROPS and ASGNVALS are cell vectors of strings.
%
%   [PROPS,ASGNVALS,DOCIND] = PNAMES(RESPOBJ) also returns a logical  
%   vector DOCIND selecting the documented properties.
%
%   PROPS = PNAMES(RESPOBJ,'specific') returns only the property names
%   specific to the child object RESPOBJ.
%
%   See also GET, SET.

%   Author(s): P. Gahinet, 7-8-97
%	 Karen D. Gondoly, 1-2-98 (Modified for Response Objects) 
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.6 $ $Date: 2000/06/14 20:10:28 $

% Linear Simulation Response (lsimplot)-specific public properties
Props = fieldnames(RespObj);
Props = Props(1:length(Props)-1);

% Append parent properties for PNAMES(RESPOBJ) syntax
if nargin==1
   if nargout==1,
      % All public properties
      Props = [Props ; pnames(RespObj.response)];
      
   else
      % List of assignable values
      AsgnVals = {'cell array of input signals'};
      DocInd = logical(ones(size(AsgnVals)));
      
      [RespProps,RespVals,RespDoc] = pnames(RespObj.response);
      Props = [Props ; RespProps];
      AsgnVals = [AsgnVals ; RespVals];
      DocInd = [DocInd ; RespDoc];
   end
end