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

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 7 Apr. 2011

1 Stimme

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

1 Kommentar

Paulo Silva
Paulo Silva am 7 Apr. 2011
that's a very sneaky way to convert logical to double :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by