Type::TableOfEntry

Type representing tables with specified entries

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

testtype(obj, (obj_type))

Description

Type::TableOfEntry(obj_type) describes tables with entries of type obj_type.

The call testtype(obj, Type::TableOfEntry(obj_type)) checks, whether obj is a table and all entries of this table are of the type obj_type. If both conditions are met, the call returns TRUE, otherwise FALSE.

The entries of a table are the right hand sides of the operands of a table.

This type does not represent a property.

Examples

Example 1

The following table uses identifiers as keys and integers as entries:

T := table(a = 1, b = 2, c = 3, d = 4):
testtype(T, Type::TableOfEntry(DOM_INT))

Type::TableOfEntry only checks the type of the entries, not the keys:

T := table(a = 1, b = 2, c = 3, d = 4):
testtype(T, Type::TableOfEntry(DOM_IDENT))

delete T:

Parameters

obj

Any MuPAD® object

obj_type

The type of the entries; can be an object of the library Type or one of the possible return values of domtype and type

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?