MathGroup Archive 2000

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

Search the Archive

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


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



  • Prev by Date: Re: How to add a vector to a list of vectors?
  • Next by Date: Re: How to add a vector to a list of vectors?
  • Previous by thread: How to add a vector to a list of vectors?
  • Next by thread: Re: How to add a vector to a list of vectors?