matrix
matrix(expr)dim
Returns dimension of vector expr.
matrix(expr)dim(dimp)
Changes this dimension.
Note:
Default anyflo vector is an array of floats (dimension 1):
x1
x2
...
xn
This dimension can be changed by:
dimp=2: 2D vector:
x1, y1,
x2, y2/sub>
...
xn, yn
dimp=3: 3D vector:
x1, y1, z1
x2, y2, z2
xn, yn, zn
...
etc...
Applications
1) To define the dimension of a motif,
of a loi of a neural network.
2) To define the dimension of a polygonal line:
matrix(LP)dim(2)
mase LP a 2D line.
matrix(LP)dim(3)
made LP a 3D line.
matrix unit
Returns the unit matrix.
Example:
edit(matrix unit)format(4); prints:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0