function [hh, bb] = shortPeriodCategoryBPlot(varargin)
%SHORTPERIODCATEGORYBPLOT Draw MIL-F-8785C short-period category B requirements plot
%
%   SHORTPERIODCATEGORYBPLOT( NALPHA, OMEGA ) plots vector OMEGA versus vector NALPHA.
%   If NALPHA or OMEGA is a matrix, then the function plots the vector versus the rows
%   or columns of the matrix, whichever line up. If NALPHA is a scalar and OMEGA
%   is a vector, the function creates the disconnected line objects and plots them
%   as discrete points vertically at NALPHA.
%
%   SHORTPERIODCATEGORYBPLOT( NALPHA, OMEGA, LINESPEC ) plots vector OMEGA versus vector NALPHA
%   with an optional line specification, LINESPEC.
%
%   SHORTPERIODCATEGORYBPLOT( NALPHA1, OMEGA1, LINESPEC1, NALPHA2, OMEGA2, LINESPEC2, NALPHA3, OMEGA3, LINESPEC3, ... )
%   combines the plots defined by the (NALPHA, OMEGA, LINESPEC) triples.
%
%   SHORTPERIODCATEGORYBPLOT(___, Name,Value ) plots an altitude envelope contour
%   specified by one or more Name,Value pairs.
%
%   SHORTPERIODCATEGORYBPLOT(AX, ___) draws an altitude contour plot onto the axes AX.
%
%   [H, B] = SHORTPERIODCATEGORYBPLOT(___) returns a vector of line objects H
%   and a vector of boundaryline objects B.
%
% Inputs:
%   AX       :Optional scalar handle to a valid axes. By default, SHORTPERIODCATEGORYBPLOT
%             plots to the current axes. 
%             To get the current axes, use the gca function.
%
%   NALPHA   :Numeric scalar, vector, or matrix specifying the load factor per
%             angle of attack (n/α).
%             NALPHA has units of g's / radian.
%
%   OMEGA    :Numeric scalar, vector, or matrix specifying the short-period
%             undamped natural frequency response (ω_n_sp).
%             OMEGA has units of radian / second.
%
%   LINESPEC :Scalar string specifying the line specification for the
%             plotted boundaryline.
%             LINESPEC is made of one element from any or all the following 3 columns.
%          Line Color:         Marker Style:           Line Style:
%          b     blue          .     point              -     solid
%          g     green         o     circle             :     dotted
%          r     red           x     x-mark             -.    dashdot
%          c     cyan          +     plus               --    dashed
%          m     magenta       *     star             (none)  no line
%          y     yellow        s     square
%          k     black         d     diamond
%          w     white         v     triangle (down)
%                              ^     triangle (up)
%                              <     triangle (left)
%                              >     triangle (right)
%                              p     pentagram
%                              h     hexagram
%
%             By default, LINESPEC is 'o'.
%
% Name,Values:
%   Level :Scalar string specifying the requirement level to plot.
%          Level must be one of the following:
%              "1"
%              "2"
%              "3"
%              "All"
%          By default, Level is "All".
%
% Additionally, all Name,Values of the line function can be specified.
% For a list of these Name,Values, see the documentation for line.
%
% Outputs:
%   H :Vector of line objects to the plotted NALPHA, OMEGA data.
%   B :Vector of boundaryline objects.
%      The length of B depends on the specified 'Level' Name,Value.
%
% Examples:
%    Plot the reference MIL-F-8785C short-period category B requirements.
%      shortPeriodCategoryBPlot([])
%
%    Plot nalpha, omega data against the level 1 short-period category B requirements
%    using diamond markers.
%      nalpha = 1:10;
%      omega = rand(10)+1;
%      shortPeriodCategoryBPlot(nalpha, omega, "d", "Level","1");

% Copyright 2021 The MathWorks, Inc.

narginchk(1,inf)

try
    [h, b] = shortPeriodBasePlot(varargin, "B");
catch ME
    throw(ME)
end

if nargout > 0
    hh = h;
    bb = b;
end

end