MuPAD® notebooks are not recommended. 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.
Suppose, you have a function
f(x). The value
a limit of the function
f(x) at x = x0:
limit(sin(x)/x, x = 0); limit((1 - cos(x))/x, x)
Avoid computing limits for floating-point arguments.
If you use floating-point numbers as the parameters of
limit, the round-off
error can completely change the result. For example, a small error
in the following example with the floating-point parameter changes
the result from a rational number to the floating-point infinity:
limit((sin(x) - x)/x^3, x = 0); limit((1.000001*sin(x) - x)/x^3, x = 0)