MathGroup Archive 2012

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

Search the Archive

Re: FindRoot with a vector of unknowns


Solve[#, x][[1]] & /@ Thread[x - {1, 2, 3} == {0, 0, 0}]

{{x -> 1}, {x -> 2}, {x -> 3}}

(Reduce[#, x] // ToRules) & /@ Thread[x - {1, 2, 3} == {0, 0, 0}]

{{x -> 1}, {x -> 2}, {x -> 3}}

FindRoot[#, {x, 1}] & /@ Thread[x - {1, 2, 3} == {0, 0, 0}]

{{x -> 1.}, {x -> 2.}, {x -> 3.}}


Bob Hanlon

On Sun, Feb 19, 2012 at 6:28 AM, Sam Takoy <sam.takoy 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
>



  • Prev by Date: Re: How best to implement a hash table in Mathematica
  • Next by Date: Re: multiple selection control
  • Previous by thread: FindRoot with a vector of unknowns
  • Next by thread: Re: FindRoot with a vector of unknowns