|
Contents | Previous | Next | Subchapters |
| Syntax |
base variable(row, column)
|
| See Also | rowbase , colbase , dim |
base command was present in version 4 of O-Matrix
but has been removed in version 5.
If this command is used in version 5x,
an error message to this effect is displayed.
The old documentation for the base command is included below to aid
in converting programs that use this command to run under version 5.
base statement to change the indices.
Entering
x = {-6, -3, 0, 3, 6}
base x(-2, 1)
print x(-1), x(0), x(1)
O-Matrix will respond
-3 0 3
because x(-2) corresponds to the first element of
the column vector x.
Entering
y = {[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]}
base y(-1, -2)
print y.row(0)
will result in
[ 6 , 7 , 8 , 9 , 10 ]
If you continue the example above by entering
print y.col(0)
O-Matrix will respond
{
3
8
13
}
If you continue the example above by entering
print y(0, 0)
O-Matrix will respond
8