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 » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: List vs. array in Mathematica
Replies: 1   Last Post: Apr 13, 2014 5:26 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Richard Fateman

Posts: 1,539
Registered: 12/7/04
Re: List vs. array in Mathematica
Posted: Apr 13, 2014 5:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 4/12/2014 2:15 AM, wrote:
> In mathematica, is an array simply a list of uniform depth?
No. An Array is a List. For example,

z= Array[f,4] returns{f[1],f[2],f[3],f[4]}
Head[z] returns List

is perfectly legal.

Note, there is a program Array[ ] which can be used to initially
construct Lists.
> terms are used in the documentation, but I haven't run across an
> explicit explanation of why two terms are needed for the same
> construct.

They aren't. The term "array" is used in computer science and
conventional programming languages for a different data structure
with different storage requirements and different access efficiencies.

So I'm wondering if their relationship is.

Their relationship with respect to Mathematica is: the proprietors
of the program define arrays as lists, ignoring conventions in computer
science. One can speculate as to why.

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-2018. All Rights Reserved.