The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.symbolic

Topic: [Axiom] matrix element access
Replies: 3   Last Post: Aug 13, 2017 10:30 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
asetofsymbols@gmail.com

Posts: 41
Registered: 11/11/16
[Axiom] matrix element access
Posted: Aug 13, 2017 5:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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)



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.