Function: math[dim/fill] - fills an array or matrix with an expression
Calling Sequence:
dim(n, 'fill'=expr);
dim(m, n, 'fill'=expr);
dim(n1, n2, ..., nz, 'fill'=expr);
Parameters:
m, n, n1, n2, nz
- positive integers
expr
- an expression
fill
- the name
Description:
The function fills a matrix or an array with a specific value expr.
In the first form, the result is a square matrix [(n, n)-matrix] with all entries set to expr.
In the second form, the result is a (m, n)-matrix with all entries set to expr.
In the third and most general form, the result is an array with dimension z with all entries set to expr.
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(3, fill=0);
> dim(2, 3, fill=1);
> dim(2, 2, 2, fill=0);
See Also:
math/dim , math/dim/identity , math/isDiagonal , array , linalg/matrix , linalg/vector , linalg .
Version History:
Version 1.0 - March 16, 1998