Function: math[dim] - creates special matrices and arrays
Calling Sequence:
dim(L, 'diagonal');
dim(n, 'identity');
dim(m, n, 'identity');
dim(n1, n2, ..., nz, 'identity');
dim(n, 'fill'=expr);
dim(m, n, 'fill'=expr);
dim(n1, n2, ..., nz, 'fill'=expr);
Parameters:
L
- a list
m, n, n1, n2, nz
- positive integers
expr
- an expression
diagonal, identity, fill
- names
Description:
In the first form, dim creates a diagonal matrix. See math/dim/diagonal for more details.
In the second to fourth form, dim creates an identity matrix or array. See math/dim/identity for more info.
In the fifth to seventh form, dim fills an array (thus also a matrix) with a specific value. See math/dim/fill for further details.
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, dim).
Examples:
> with(math, dim):
> dim([1, 2, 3], diagonal);
> dim(3, identity);
> dim(3, fill=0);
See Also:
array , vector , matrix , math/isDiagonal , math/isIdentity , math/isSymmetric , math/isAntiSymmetric , math/isQuadratic .
Version History:
Version 1.0 - March 16, 1998