quickplt.m
function quickplt(x,y,xtext,ytext,maintitle,gridon)
%
% QuickPlt function - plots a single set of x,y data with optional titles and grid
% USAGE:
% quickplt(x,y,xtext,ytext,maintitle,gridon)
% REQUIRED INPUT as VECTORS:
% x,y - data to be plotted
% OPTIONAL INPUT as STRINGS:
% xtext,ytext - x axis, yaxis titles
% maintitle - main title for graph
% gridon - any string will turn on the grid
% NOTE: optional elements are interpreted in order from left to right.
% Any number of arguments from 2 to 6 are allowed.
plot(x,y) % first the plot, then the option...
if nargin == 2, return, end
if nargin > 2, xlabel(xtext); end
if nargin > 3, ylabel(ytext); end
if nargin > 4, title(maintitle); end
if nargin > 5, grid; end