Conditional structures: Difference between revisions
Content added Content deleted
m (Category:Simple, {{out}}) |
m (→{{header|MATLAB}}: ===) |
||
Line 2,121: | Line 2,121: | ||
=={{header|MATLAB}}== |
=={{header|MATLAB}}== |
||
If statements |
===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 |
===Switch statements=== |
||
Example: |
Example: |
||
<lang MATLAB>switch x |
<lang MATLAB>switch x |