Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9376 > unrolled thread
| Started by | Amatya <asinha@rhsmith.umd.edu> |
|---|---|
| First post | 2012-04-03 08:46 +0000 |
| Last post | 2012-04-03 08:46 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Mathematica loop Amatya <asinha@rhsmith.umd.edu> - 2012-04-03 08:46 +0000
| From | Amatya <asinha@rhsmith.umd.edu> |
|---|---|
| Date | 2012-04-03 08:46 +0000 |
| Subject | Mathematica loop |
| Message-ID | <jleddt$gte$1@smc.vnet.net> |
Hi,
I have a vector of n=5 variables x, that are the solution of "n=5" non-linear equations. I have i= 1 to 100 vectors of coefficient data "ci" of the non linear equations, and for each of those vectors "ci", I want to solve the system of non-linear equations and return a solution vector x. So in the end I want 100x5 matrix where each row represents different coefficients and each column represents one of the variables of x.
Also, all of the non-linear equations are very sensitive to starting points in the FindRoot. I need some flexibility so I can specify a different starting point and domain in which FindRoot looks for the solution, for each of the 100 values of the input parameters. Is there a clean way to do this?
My algorithm should basically do this:
Initial search point: a1=something,...,a5=something
For i = 1 to 100
x/.FindRoot[{f1(x;ci)==0,..,f5(x;ci)==0},{{x1,a1}...{x5,a5}}]
Store results in a Matrix
a1=new start value according to formula based on i
.. a5= new value according to formula based on i
i=i+1
Is it possible to do this using Table or something? Solve a 100 FindRoots in one shot giving all the initial search points and coefficient values as vector or matrix input?
Thanks
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web