Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8646
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@ymail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: FindRoot with a vector of unknowns |
| Date | 2012-02-20 07:54 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jhsu8f$np7$1@smc.vnet.net> (permalink) |
| References | <jhqmed$f70$1@smc.vnet.net> |
On Sun, 19 Feb 2012 11:29:17 -0000, Sam Takoy <sam.takoy@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
>
Well, this is implicitly a loop, but perhaps it's a little more elegant
than what you may have been thinking of:
MapThread[
FindRoot[x - #1 == #2, {x, #3}] &,
{{1, 2, 3}, {0, 0, 0}, {1, 1, 1}}
]
giving:
{{x -> 1.}, {x -> 2.}, {x -> 3.}}
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
FindRoot with a vector of unknowns Sam Takoy <sam.takoy@yahoo.com> - 2012-02-19 11:29 +0000 Re: FindRoot with a vector of unknowns "Oleksandr Rasputinov" <oleksandr_rasputinov@ymail.com> - 2012-02-20 07:54 +0000 Re: FindRoot with a vector of unknowns Szabolcs Horvát <szhorvat@gmail.com> - 2012-02-20 07:57 +0000 Re: FindRoot with a vector of unknowns Ray Koopman <koopman@sfu.ca> - 2012-02-21 11:16 +0000
csiph-web