ファイル名:Ygrid.m
function ygrid(opt_grid);
% YGRID Ygrid lines.
% YGRID ON adds grid lines to the current axes.
% YGRID OFF takes them off.
% YGRID, by itself, toggles the grid state.
%
% YGRID sets the YGrid 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,'YGrid'),'off')
set(ax,'YGrid','on');
else
set(ax,'YGrid','off');
end
elseif strcmp(opt_grid, 'on')
set(ax,'YGrid', 'on');
elseif strcmp(opt_grid, 'off')
set(ax,'YGrid', 'off');
else
error('Unknown command option.');
end