This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Type representing set-theoretic expressions

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.


testtype(obj, Type::Set)


Type::Set comprises all expressions in which the operators are set-theoretic operations

A set-theoretic expression is defined to be any of the following: a set constant, an identifier, an unevaluated call to a set-valued function, or the composition of set-theoretic expressions by the operator union, intersect, or minus.

The following objects are set constants: finite sets of type DOM_SET, intervals, the universe, and every object that belongs to a domain of category Cat::Set.

The following functions are set-valued: solve, discont, RootOf, and solvelib::Union.

The union, intersection, or difference of objects is not a set-theoretic expression unless each of the objects is. See Example 2.


Example 1

Sets are set-theoretic expressions.

testtype({3}, Type::Set)

Example 2

Unions, intersections, and differences are set-theoretic expressions if and only if all operands are.

testtype(a union {4}, Type::Set)

testtype(a+1 union {4}, Type::Set)

Example 3

If the call to a set-valued function as solve returns unevaluated, then the result is a set-theoretic expression.

solve(x^2 = sin(x + 1), x)

testtype(%, Type::Set)



Any MuPAD® object

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?