Conditional structures: Difference between revisions

Content added Content deleted
m (Category:Simple, {{out}})
Line 2,121: Line 2,121:


=={{header|MATLAB}}==
=={{header|MATLAB}}==
If statements<br />
===If statements===
Example:
Example:
<lang MATLAB>if x == 1
<lang MATLAB>if x == 1
Line 2,130: Line 2,130:
disp 'x<1';
disp 'x<1';
end</lang>
end</lang>
Switch statements<br />
===Switch statements===
Example:
Example:
<lang MATLAB>switch x
<lang MATLAB>switch x