LTPDA_ALLGRID Set all the grids to 'state' usage: ltpda_allgrid('state') M Hewitson 17-11-02 $Id: ltpda_allgrid.html,v 1.1 2007/06/08 14:15:10 hewitson Exp $
0001 function ltpda_allgrid(state) 0002 0003 % LTPDA_ALLGRID Set all the grids to 'state' 0004 % 0005 % usage: ltpda_allgrid('state') 0006 % 0007 % M Hewitson 17-11-02 0008 % 0009 % $Id: ltpda_allgrid.html,v 1.1 2007/06/08 14:15:10 hewitson Exp $ 0010 % 0011 0012 0013 if (strcmp(state,'on') || strcmp(state,'off')) 0014 0015 c = get(gcf, 'children'); 0016 0017 for k=1:length(c) 0018 0019 t = get(c(k), 'Tag'); 0020 if t=='' 0021 set(c(k), 'XGrid', state); 0022 set(c(k), 'YGrid', state); 0023 end 0024 0025 end 0026 else 0027 error('state must be on or off'); 0028 end 0029 0030 % 0031 % END