Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with Thread over Plus?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65396] Re: Problem with Thread over Plus?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Thu, 30 Mar 2006 05:29:47 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 3/29/06 at 6:34 AM, Vincent.Virgilio at itt.com (Virgilio, Vincent -
SSD) wrote:

>Why does this work:

>Thread[ Plus[ {1,1} , { {1,1} , {2,2} } ] ]

This is equivalent to

{Plus[1,{1,1}],Plus[1,{2,2}]}

>but this doesn't?

>Thread[ Plus[ {1,1} , { {1,1} , {2,2} , {3,3} } ] ]

The first argument to plus is a list of two elements and the second argument is a list of three elements. What would do expect Mathematica to do when there is no element in the first argument to correspond to the last element of the second argument.

Perhaps you want

{1,1}+$&/@{{1,1},{2,2},{3,3}}
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Problem with Thread over Plus?
  • Next by Date: Re: Plotting independent quantities
  • Previous by thread: Re: Problem with Thread over Plus?
  • Next by thread: Re: Problem with Thread over Plus?