how to make a condition: if grid minor;

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

a = 0 + ismember('on', get(gca,{'XMinorGrid','YMinorGrid','ZMinorGrid'});

1 Comment

that's a very sneaky way to convert logical to double :)

Sign in to comment.

More Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!