There are several differences between MATLAB® and MuPAD® syntax. Be aware of which interface you are using in order to use the correct syntax:
Use MATLAB syntax in the MATLAB workspace, except for
which use MuPAD syntax.
Use MuPAD syntax in MuPAD notebooks.
You must define MATLAB variables before using them. However, every expression entered in a MuPAD notebook is assumed to be a combination of symbolic variables unless otherwise defined. This means that you must be especially careful when working in MuPAD notebooks, since fewer of your typos cause syntax errors.
This table lists common tasks, meaning commands or functions, and how they differ in MATLAB and MuPAD syntax.
Common Tasks in MATLAB and MuPAD Syntax
|Task||MATLAB Syntax||MuPAD Syntax|
|Numerical value of expression|
|Equality, inequality comparison|
The next table lists differences between MATLAB expressions and MuPAD expressions.
MATLAB vs. MuPAD Expressions
|MATLAB Expression||MuPAD Expression|
The MuPAD definition of exponential integral differs from the Symbolic Math Toolbox™ counterpart.
|Symbolic Math Toolbox Definition||MuPAD Definition|
expint(x) = –Ei(–x) =