MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
As a shortcut for a closing statement, use the
end command. This command
if ... then ... else (a
Case Selection Structures
case ... of (a
Loops (a shortcut for
Procedures (a shortcut for
For example, the following two loops are equivalent:
for i in [0, 1, 0, 0] do if i = 1 then print(Unquoted, "True") else print(Unquoted, "False") end_if end_for
for i in [0, 1, 0, 0] do if i = 1 then print(Unquoted, "True") else print(Unquoted, "False") end end