function schema
%SCHEMA  Definition of @PZMapOptions 
% Options for @respplot

%  Author(s): C. Buhr
%  Copyright 1986-2004 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:52:13 $

% Register class 
pkg = findpackage('plotopts');
superclass = findclass(pkg, 'RespPlotOptions');
c = schema.class(pkg, 'PZMapOptions', superclass);

% Public attributes
p = schema.prop(c, 'FreqUnits', 'String');      
p.setfunction = {@LocalSetFreqUnits};
p.FactoryValue = 'rad/sec';


%----------------------LOCAL SET FUCTIONS---------------------------------%

% ------------------------------------------------------------------------%
% Function: LocalSetFreqUnits
% Purpose:  Error handling of setting Frequency Units property
% ------------------------------------------------------------------------%
function valueStored = LocalSetFreqUnits(this, ProposedValue)

if iscell(ProposedValue)
    ProposedValue  = ProposedValue{1};
end
if any(strcmpi(ProposedValue,{'Hz','rad/sec', 'rad/s'}))
    valueStored = ProposedValue;
else
    error(sprintf('%s must be ''rad/s'' or ''Hz''.', 'FreqUnits'))
end