Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Re: How to add a vector to a list of vectors?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26502] Re: [mg26493] How to add a vector to a list of vectors?
  • From: BobHanlon at aol.com
  • Date: Sat, 30 Dec 2000 01:55:16 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

l = Array[v, {3, 4}];

w = {w1, w2, w3, w4};

Table[w + l[[i]],{i, Length at l}]  == (#+w& /@ l)

True

Bob Hanlon

In a message dated 12/28/00 9:53:48 PM, mtpagesj at lg.ehu.es writes:

>   I have a list of vectors l = {v1,...,vn} and another vector w, all
>of the same length. I wat to get the list {w + v1, ..., w + vn} .
>
>   l + w does not work.
>
>Is there a simpler (or more efficient) way than
>
>   Table[w + l[[i]],{i, Length at l}] ? 
>


  • Prev by Date: How can I obtain an echelon form of a Matrix in Mathematica?
  • Next by Date: Re: How to add a vector to a list of vectors?
  • Previous by thread: Re: How to add a vector to a list of vectors?
  • Next by thread: Re: How to add a vector to a list of vectors?