Documentation

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::Integer

Type and property representing integers

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.

Syntax

testtype(obj, Type::Integer)
assume(x, Type::Integer)
is(ex, Type::Integer)

Description

Type::Integer represents integers. This type can also be used as a property to mark identifiers as integers.

The call testtype(obj, Type::Integer) checks, whether obj is an integer number and returns TRUE, if it holds, otherwise FALSE.

testtype only performs a syntactical test identifying MuPAD® objects of type DOM_INT.

The call assume(x, Type::Integer) marks the identifier x as an integer number.

The call is(ex, Type::Integer) derives, whether the expression ex is an integer number (or this property can be derived).

This type represents a property that can be used in assume and is.

Examples

Example 1

The following numbers are of type Type::Integer:

testtype(0, Type::Integer), testtype(55, Type::Integer),
testtype(-111, Type::Integer)

Example 2

We use this type as a property:

assume(x, Type::Integer):

The following calls to is derive the properties of a composite expression from the properties of its indeterminates:

is(3*x, Type::Real), is(2*x, Type::Even), is(x/2, Type::Integer)

assume(y, Type::Integer): is(x + y^2, Type::Integer)

unassume(x), unassume(y):

Parameters

obj

Any MuPAD object

x

An identifier or a mathematical expression containing identifiers

ex

An arithmetical expression

Return Values

See assume, is and testtype

See Also

MuPAD Functions

Was this topic helpful?