Re: How to add a vector to a list of vectors?
- To: mathgroup at smc.vnet.net
- Subject: [mg26504] Re: [mg26493] How to add a vector to a list of vectors?
- From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
- Date: Sat, 30 Dec 2000 01:55:17 -0500 (EST)
- References: <200012290231.VAA21344@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Julian:
You can add w to each vector this way:
Map[(w+#)&, l]
Ken Levasseur
UMass Lowell
Three credit on-line Introduction to Mathematica starts at the end of
January: http://faculty.uml.edu/klevasseur/courses/m419/m419.html
AGUIRRE ESTIBALEZ Julian wrote:
> Dear Group,
>
> 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}] ?
>
> Julian Aguirre
> Universidad del Pais Vasco
- References:
- How to add a vector to a list of vectors?
- From: AGUIRRE ESTIBALEZ Julian <mtpagesj@lg.ehu.es>
- How to add a vector to a list of vectors?