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 any property

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


With Type::Property, properties can be identified.

The call testtype(obj, Type::Property) checks, whether the MuPAD® object obj is a property and returns TRUE, if it holds, otherwise FALSE.

Some elements of the library Type serve two functions. One is to perform syntactical tests to identify the type of an object (with testtype), the other is to occur as a property within assume and is.


Type::Property itself is not a property.

To determine whether an element of Type is a property, Type::Property can be used with testtype.

This type does not represent a property.


Example 1

Is Type::PosInt a property?

testtype(Type::PosInt, Type::Property)

Also an interval created with Type::Interval is a property:

testtype(Type::Interval(0, 1), Type::Property)

Is Type::Constant a property?

testtype(Type::Constant, Type::Property)

Type::Constant is not a property and cannot be used as argument of assume:

assume(x, Type::Constant)
Error: Second argument must be a property. [assume]

The next example shows the usage of testtype to select properties among operands of Type:

T := Type::Numeric, Type::PosInt, Type::Unknown, Type::Zero:
select(T, testtype, Type::Property)

delete x, T:



Any MuPAD object

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?