1 %> @ingroup misc graphicsapi
 
    2 %> @brief Maximizes figure on screen
 
    5 %> Has a workaround to prevent figure from occupying two monitors, which
 
    6 %> consists of dividing the width by two 
if the width-to-height ratio is
 
    9 %> @param h =gcf() Handle to figure.
 
   10 %> @param aspectratio =1.618. If used, first making the image 
as big 
as possible, then reduce one of the dimensions to obbey 
 
   11 %> <code>width/height = aspectratio</code>
 
   12 %> @param normalizedsize =1. Multiplying factor for the calculated width and height
 
   14 if nargin < 1 || isempty(h)
 
   18 if nargin < 3 || isempty(normalizedsize)
 
   22 p = get(0,'Screensize'); % p(3) is width, and p(4) is height
 
   23 p(3:4) = floor(p(3:4)*.99);
 
   26     % Likely to be picking the full 
double monitor screen size
 
   30 if nargin >= 2 && ~isempty(aspectratio)
 
   31     ar_original = p(3)/p(4);
 
   32     arar = aspectratio/ar_original;
 
   42 p(3:4) = p(3:4)*normalizedsize;
 
   45 set(h, 'Position', p);
 
function maximize_window(in h, in aspectratio, in normalizedsize)
Analysis Session (AS) base class.