Type of an object
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.
type(object) returns the type of the object.
object is an expression of domain type
then its type is determined by its 0-th operand (the “operator”).
If the operator has a
"type" slot, then
this value, which usually is a string. If the operator has no
type returns the string
If an object is not an expression, its type equals its domain type:
The operator of a sum is
_plus; the type slot of that operator
type(x + y*z)
type evaluates its argument: thereby, the
the sum of
type is not
type(x - y)
If the operator of an expression is not a function environment
having a type slot, the expression is of type
The following call to
type is not regarded
as a call with two arguments, because expression sequences in the
argument are not flattened:
Any MuPAD® object
Domain type of type
DOM_DOMAIN or a character string.