MathGroup Archive 2001

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

Search the Archive

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


AGUIRRE ESTIBALEZ Julian schrieb:
> 
> 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@l}] ?


Try  Map[ Plus[w,#]&, l ]

-- 
Roland Franzius

  +++ exactly <<n>> lines of this message have value <<FALSE>> +++


  • Prev by Date: what are these polynomials called?
  • Next by Date: [Q] symbolic matrix operation?
  • Previous by thread: Re: How to add a vector to a list of vectors?
  • Next by thread: Looking for Generalized SVD or C-S decomposition Mathematica code