The syntax for elseif statement in Matlab is as follows:
main.m122 chars10 lines
To write the expression ytick(i) > -10 & ytick(i) < 0
using elseif statement in Matlab, we can use the following code:
main.m220 chars8 lines
Here, if ytick(i)
is less than -10
, then the first set of statements will be executed. If ytick(i)
is between -10
and 0
, then the second set of statements will be executed. Otherwise, the third set of statements will be executed.
gistlibby LogSnag