List of Commands
Control Structure/Command | Description |
---|---|
for | Repeat the statements specific number of times |
while | Repeat the statements if the condition is true or non-zero |
if | Conditionally execute the statements |
switch | Switch between cases depending upon the condition |
break | Terminate the execution of for or while loop |
continue | Pass the control to next iteration of for or while loop |
error | Display message and abort function |
try-catch | Catch the error generated by MATLAB |
Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.