Close a block statement
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.
end is a keyword which, depending on the
context, is parsed as one of the following keywords:
Each of the keywords
while starts some block construct in
the MuPAD® language. Each block can be closed with
with the corresponding special keyword
f := proc(a, b) local i; begin for i from a to b do if isprime(i) then print(Unquoted, expr2text(i)." is a prime") end end end:
23 is a prime
29 is a prime
The parser translates
end to the appropriate
keyword matching the type of the block:
proc(a, b) name f; local i; begin for i from a to b do if isprime(i) then print(Unquoted, expr2text(i)." is a prime") end_if end_for end_proc