Documentation Center

  • Trial Software
  • Product Updates


Type representing tables with specified indices

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


testtype(obj, (obj_type))


Type::TableOfIndex(obj_type) represents tables with indices (keys) of type obj_type.

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

The indices of a table are the left hand sides of the operands of a table.

This type does not represent a property.


Example 1

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

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

Type::TableOfIndex only checks the types of the keys of the table, so the following call returns FALSE:

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

delete T:



Any MuPAD® object


The type of the indices; 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?