Documentation

# Evaluation

Control evaluation and level of evaluation, prevent infinite recursions

### 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.

 `block` Create an object protected against evaluation `blockIdents` Create a block with some identifiers protected against evaluation `blockTransparent` Create a transparent block protected against evaluation `unblock` Replace blocks by their contents `context` Evaluate an object in the enclosing context `eval` Evaluate an object `evalassign` Assignment with evaluation of the left hand side `evalAt` Insert a value (evaluate at a point) `evalp` Evaluate a polynomial at a point `freeze` Create an inactive copy of a function `unfreeze` Create an active copy of a frozen function `hold` Delay evaluation `LEVEL` Substitution depth of identifiers `level` Evaluate an object with a specified substitution depth `MAXDEPTH` Prevent infinite recursion during procedure calls `MAXEFFORT` Maximum amount of work to spend on the computation `MAXLEVEL` Prevent infinite recursion during evaluation

## Examples and How To

Enforce Evaluation

MuPAD automatically evaluates results returned by most of the system functions.

Prevent Evaluation

When you perform interactive computations in MuPAD, the system tries to evaluate all expressions before returning them.

Evaluate at a Point

To evaluate an expression for particular values of identifiers, use the `evalAt` function or its shortcut `|`.

## Concepts

Evaluations in Symbolic Computations

Evaluation is one of the most common mathematical operations.

Level of Evaluation

The value of an identifier can contain arbitrary MuPAD objects, including identifiers.

Actual and Displayed Results of Evaluations

When MuPAD evaluates an expression or executes a command, the output that the system displays can differ from the actual result.

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos