Documentation

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

Type representing arithmetical objects

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

Description

Type::Arithmetical represents arithmetical objects.

In MuPAD®, arithmetical objects are objects that represent complex numbers if all identifiers in them also represent complex numbers. Arithmetical objects include numbers, most expressions, and elements of certain library domains. In particular, the latter include rectform objects and series expansions of domain type Series::Puiseux.

Certain infinite objects such as dirac(0), infinity, or complexInfinity are also defined to be arithmetical expressions.

The following objects are not regarded as arithmetical objects:

  • equations and inequalities,

  • Boolean objects and Boolean expressions involving and, or, not,

  • lists,

  • sets and set expressions involving union, intersect, minus,

  • polynomials of domain type DOM_POLY,

  • functions and procedures,

  • arrays and tables.

This type does not represent a property: it cannot be used in assume to mark an identifier as an arithmetical object.

Examples

Example 1

The expression may represent a matrix if A and B are matrices, or it may represent a number if A and B are numbers. However, MuPAD regards identifiers as numbers: hence they commute with each other, and a product of identifiers represents a number, too:

A^(-1) * B * A * B

testtype(%, Type::Arithmetical)

Example 2

Numbers and expressions are regarded as arithmetical objects:

testtype(3 + I, Type::Arithmetical),
testtype(x + sqrt(2) + I*PI, Type::Arithmetical),
testtype(x/y + y/x, Type::Arithmetical)

Equations and inequalities are not regarded as arithmetical objects:

testtype(x^2 = 2, Type::Arithmetical),
testtype(x <> 2, Type::Arithmetical),
testtype(x < 2, Type::Arithmetical),
testtype(x >= 2, Type::Arithmetical)

Sets, lists, tables and arrays are not arithmetical:

testtype({a, b, c}, Type::Arithmetical),
testtype(array(1..1, [x]), Type::Arithmetical)

Most domain objects such as matrices of some matrix domain are not arithmetical:

testtype(Dom::Matrix()([[1, 2], [3, 4]]), Type::Arithmetical)

Parameters

obj

Any MuPAD object

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?