function bigfig(f)
%BIGFIG Resize current figure to fill the screen.
%	BIGFIG adjusts the current figure size to make it fill the
%	available screen area.
%
%	BIGFIG(f) performs the same adjustment on figure handle f.
%	
%	BIGFIG uses the 'ScreenSize' property
%	of the root figure, so it is compatible with any display mode
%	(e.g., 640x480, 800x600, etc.).

%	Ed Doering
%	Rose-Hulman Institute of Technology
%	04 May 1997
%  updated 7/4/97 to work with version 5

% Default to current figure if function is not passed a figure number
if nargin < 1
    f=gcf;
end

% Determine the screen size
scrn=get(0,'ScreenSize');

% Adjust the values. Version 5 acts differently than version 4 (something to
% to do with the Windows menu strip at the top of the figure). The offset values
% were determined by using Windows to make the figure fill the screen, then I used
% get(gcf,'Position') to find the actual position. Under version 4 this would give
% the same result as fetching the 'ScreenSize' property.
%scrn=scrn-[3    -1    -2    39];
%scrn=scrn-[-4   -37     8   117]; % updated for Version 6 (Winter 2001-02)

% Adjust the figure size
set(f,'Position',scrn)
