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}] ?
>