MATLAB: ‘Or’ statement in matlab

elseififor statement

How can I do this without using else if?:
if balls == 0 & ( x > 5 OR y > 7)
run xscript
end
Thanks,

Best Answer

You need two &&:
if balls == 0 && ( x > 5 || y > 7)
% run xscript
xscript();
end