Jump to content

Conditional structures: Difference between revisions

(Added a solution for MATLAB)
Line 1,180:
If statements<br />
Example:
<landlang MATLAB>if x == 1
disp 'x==1';
elseif x > 1
Line 1,189:
Switch statements<br />
Example:
<landlang MATLAB>switch x
case 1
disp 'Hello';
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.