| Simulink Reference | ![]() |
Control Flow Statements in Embedded MATLAB Functions
Embedded MATLAB functions support the following MATLAB program statements:
| Statement |
Description |
break |
break statement |
continue |
continue statement |
for |
for statement |
if |
if statementThe conditions of an if statement cannot use & and | operators. In their place, use the && and || operators, respectively. To logically collapse vectors into scalars, use the function all. |
return |
return statement |
switch |
switch statement |
while |
while statementThe conditions of while statements cannot use & and | operators. In their place, use the && and || operators, respectively. To logically collapse vectors into scalars, use the function all. |
| Operators in Embedded MATLAB Functions | Arithmetic Operators in Embedded MATLAB Functions | ![]() |
© 1994-2005 The MathWorks, Inc.