Algosim documentation: SetMaxLen

SetMaxLen

Sets the display limits on an object.

Syntax

Description

SetMaxLen(X, n) returns X with its display limit set to n. If n = 0, the global limit will be used; otherwise, n will be the effective limit.

The display limit governs how the object is printed on screen. It sets a limit to the number of members, elements, or entries that are printed. The exact behaviour depends on the type of X:

(For numbers, SetMaxLen mimics the behaviour of SetNumDigits. This is only to make the \ operator applicable to numbers.)

The \ operator is mapped to the SetMaxLen function.

Examples

IdentityMatrix(10)
⎛1  0  0  0  0  0  0  0  0  0⎞
⎜0  1  0  0  0  0  0  0  0  0⎟
⎜0  0  1  0  0  0  0  0  0  0⎟
⎜0  0  0  1  0  0  0  0  0  0⎟
⎜0  0  0  0  1  0  0  0  0  0⎟
⎜0  0  0  0  0  1  0  0  0  0⎟
⎜0  0  0  0  0  0  1  0  0  0⎟
⎜0  0  0  0  0  0  0  1  0  0⎟
⎜0  0  0  0  0  0  0  0  1  0⎟
⎝0  0  0  0  0  0  0  0  0  1⎠
IdentityMatrix(10) \ 5
⎛1  0  0  0  0  ⋯⎞
⎜0  1  0  0  0  ⋯⎟
⎜0  0  1  0  0  ⋯⎟
⎜0  0  0  1  0  ⋯⎟
⎜0  0  0  0  1  ⋯⎟
⎝⋮  ⋮  ⋮  ⋮  ⋮  ⋱⎠

See also