% set_up_figure % % Usage: set_up_figure(figureID, titleStr, xStr, yStr) % % Switches to the selected figure, clears it, and adds the specified title % and axis labels. Note that in order for the x- and y-labels to stay % attached to the figure, the hold on command must be used before drawing % anything more to this figure. % % Input arguments: % figureID: Which figure you want to set up (1, 2, etc.) % titleStr: The desired title for the figure % xStr: The text you want for the x-label % yStr: The text you want for the y-label % % Author: Robert Wagner % Date: 2nd March 2009 % Last Modified: 2nd March 2009 function set_up_figure(figureID, titleStr, xStr, yStr) figure(figureID); clf; title(titleStr); xlabel(xStr); ylabel(yStr);