Functions and Procedures

Write basic functions and procedures

Note

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD Functions

exposeDisplay the source code of a procedure or the entries of a domain
procDefine a procedure
saveSave the state of an identifier
prog::waitWait for a while

Topics

Procedures

If you want to execute a piece of code repeatedly, create and use a procedure.

Functions

If you want to execute the same code repeatedly, create a procedure and use it.

Shortcut for Closing Statements

As a shortcut for a closing statement, use the end command.