focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / matfill
1 NAME
2     matfill - fill a matrix with specified value or values
3
4 SYNOPSIS
5     mat(m, x [, y])
6
7 TYPES
8     m           matrix
9     x           any
10     y           any
11
12     return      null
13
14 DESCRIPTION
15     For any matrix m, matfill(m, x) assigns to every element of m the
16     value x.  For a square matrix m, matfill(m, x, y) assigns the value
17     x to the off-diagonal elements, y to the diagonal elements.
18
19 EXAMPLE
20     > mat A[3]; matfill(A, 2); print A
21     mat [3] (3 elements, 3 nonzero):
22         [0] = 2
23         [1] = 2
24         [2] = 2
25
26     > mat B[2, 1:2]; matfill(B,3,4); print B
27     mat [2,1:2] (4 elements, 4 nonzero):
28         [0,1] = 4
29         [0,2] = 3
30         [1,1] = 3
31         [1,2] = 4
32
33 LIMITS
34     none
35
36 LINK LIBRARY
37     none
38
39 SEE ALSO
40     XXX - fill in
41