This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Type representing relations

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::Relation)


With Type::Relation, relational expression can be identified.

The call testtype(obj, Type::Relation) checks, whether obj is a relational expression and returns TRUE, if it is, otherwise FALSE.

A relation in MuPAD® is an expression of the type " _equal ", " _unequal ", " _less " and " _leequal ".


Expressions with the operations >= and > will be interpreted as expressions with <= and < by exchanging the operands (see Example 2).

This type does not represent a property.


Example 1

x > 3 is a relation, while TRUE is not:

testtype(x > 3, Type::Relation),
testtype(TRUE, Type::Relation)

Example 2

MuPAD always interprets expressions with the operations >= and > as expressions with <= and < with the operands exchanged:

x > 3;
prog::exprtree(x > 3):

+-- 3
`-- x

The operator is not >, but <, and the operands have been swapped:

op(x > 3, 0..2)



Any MuPAD object

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?