Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13050 > unrolled thread
| Started by | o.sandig@googlemail.com |
|---|---|
| First post | 2013-01-07 05:36 +0000 |
| Last post | 2013-01-08 04:04 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
How to speed up FindRoot with Map or MapThread o.sandig@googlemail.com - 2013-01-07 05:36 +0000
Re: How to speed up FindRoot with Map or MapThread Frank K <fkampas@gmail.com> - 2013-01-08 04:04 +0000
| From | o.sandig@googlemail.com |
|---|---|
| Date | 2013-01-07 05:36 +0000 |
| Subject | How to speed up FindRoot with Map or MapThread |
| Message-ID | <kcdmsj$m0o$1@smc.vnet.net> |
Hi,
I would like to speed up FindRoot.
In this special case I'm looking for roots of the equation
sin[2*theta]+2*h*sin[theta - phi]
for different h's and phi's.
To do this I specify for each h the region within which the solution has to be found: X = {x_middle, x_left, x_right}, e.g.:
FindRoot[sin[2*theta] + 2*h1*sin[theta - phi1] == 0 , {theta, x_middle, x_left, x_right}]
That means that h is an mx1 matrix and X is an nx3 matrix (X = {x_middle, x_left, x_right}).
The question:
How can I use Map or MapThread to combine each element of h with the whole matrix X inside FindRoot to speed it up?
Thanks for any idea.
[toc] | [next] | [standalone]
| From | Frank K <fkampas@gmail.com> |
|---|---|
| Date | 2013-01-08 04:04 +0000 |
| Message-ID | <kcg5t7$rcp$1@smc.vnet.net> |
| In reply to | #13050 |
You can simplify the code by using Map or MapThread, but you won't speed it up.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web