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: Question about Thread & Total
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Themis Matsoukas

Posts: 322
From: Penn State
Registered: 6/20/10
Question about Thread & Total
Posted: Jan 26, 2013 1:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I was wondering why the error message in the example below:

Thread[Total[{{1}, {2, 3}}]]

Total::tllen: Lists of unequal length in {{1},{2,3}} cannot be added. >>

{1, 5}

On the other hand, the construction below gives the same answer without complaints:

Thread[h[{{1}, {2, 3}}]] /. h -> Total

{1, 5}

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.