MathGroup Archive 2012

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

Search the Archive

Re: FindRoot with a vector of unknowns


On Feb 19, 3:29 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
> Hi,
>
> Is there an elegant way to implement what I am trying to do here,
> that is, solve for a vector of unknowns:
>
> FindRoot[x - {1, 2, 3} == {0, 0, 0}, {x, {1, 1, 1}}]
>
> I can do this writing a loop, but hoping for a "vectorized" solution.
>
> Thanks,
>
> Sam

I usually use different symbols for the vector and its elements.

In[1]:= Clear[x]; X = Array[x,3];
        FindRoot[X - {1,2,3} == {0,0,0}, Thread@{X,1}]

Out[2]= {x[1] -> 1., x[2] -> 2., x[3] -> 3.}



  • Prev by Date: UV Mapping meshes
  • Next by Date: Re: Print Selection, Mathematica 7, in Lion
  • Previous by thread: Re: FindRoot with a vector of unknowns
  • Next by thread: Why HoldForm[] shows this expression in red in notebook?