Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



[Axiom] matrix element access
Posted:
Aug 13, 2017 5:28 AM


a:=matrix[[i+j for i in 1..4] for j in 1..4]
One can access the element i,j with
a(i,j)
But if i want a matrix of lists as a:=matrix[[[i,j] for i in 1..4] for j in 1..4]
a(i,j) result to me can not return [i,j]
Where is the error? What does it mean "SUB"?
What about use as nxn matrix, list of list?
Here b:=[[[i,j] for i in 1..4] for j in 1..4]
here b.i.j return [i,j]
But if with list of list one can have matrix types, why define a new type Matrix?
Then i have the doubt it is better array start from 0 and not from 1 (but this can be always easy to solve)



