Clear Filters
Clear Filters

how to make a condition: if grid minor;

3 views (last 30 days)
Hi, how to make a condition, if grid minor; I am trying to do:
if grid==minor
a=1
else
a=0
end

Accepted Answer

Walter Roberson
Walter Roberson on 7 Apr 2011
a = 0 + ismember('on', get(gca,{'XMinorGrid','YMinorGrid','ZMinorGrid'});
  1 Comment
Paulo Silva
Paulo Silva on 7 Apr 2011
that's a very sneaky way to convert logical to double :)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!