ファイル名:Xgrid.m
function xgrid(opt_grid);
% XGRID Xgrid lines.
% XGRID ON adds grid lines to the current axes.
% XGRID OFF takes them off.
% XGRID, by itself, toggles the grid state.
%
% XGRID sets the XGrid properties of the current axes.
%
% See also TITLE, XLABEL, YLABEL, ZLABEL, AXES, PLOT.
% Copyright (c) 1984-97 by The MathWorks, Inc.
% $Revision: 5.3 $ $Date: 1997/04/08 06:08:16 $
ax = gca;
if nargin == 0
if strcmp(get(ax,'XGrid'),'off')
set(ax,'XGrid','on');
else
set(ax,'XGrid','off');
end
elseif strcmp(opt_grid, 'on')
set(ax,'XGrid', 'on');
elseif strcmp(opt_grid, 'off')
set(ax,'XGrid', 'off');
else
error('Unknown command option.');
end