function h = nicholspeak(varargin)
%NICHOLSPEAK  Constructor for Nichols closed-loop peak gain constraint objects.

%   Author(s): Bora Eryilmaz
%   Revised: A. Stothert
%   Copyright 1986-2004 The MathWorks, Inc. 
%   $Revision: 1.1.6.2 $ $Date: 2004/12/10 19:31:45 $

% Create class instance
hParent = [];
if nargin > 0
   %Check to see if we've an explicit parent setting
   idx = find(strcmpi(varargin,'Parent'));
   if ~isempty(idx)
      hParent = varargin{idx+1};
      varargin = {varargin{1:idx-1}, varargin{idx+2:end}};
   end
end
if ~isempty(hParent)
   h = plotconstr.nicholspeak('Parent',hParent);
else
   h = plotconstr.nicholspeak;
end
h.EventManager = ctrluis.eventmgr;
h.Data         = plotconstr.constrdata;

% Initialize properties 
h.OriginPha      = -180; % phase margin location (in deg)
h.PeakGain       =    3;  % peak closed-loop gain (in dB)
h.PhaseUnits     = 'deg';
h.MagnitudeUnits = 'dB';
h.xDisplayUnits  = 'deg';
h.yDisplayUnits  = 'dB';

% Install default BDF
h.defaultbdf;

if ~isempty(varargin)
   %Set any constructor called properties
   set(h,varargin{:})
end
