There's also this - http://code.jsoftware.com/wiki/Scripts/nlls - an
implementation of the Levenberg-Marquardt algo that I cribbed from someone
who copied it from APL.
On Thu, Aug 10, 2017 at 6:47 PM, Don Kelly wrote:
> I also suggest that you look at references to the use of NR
I also suggest that you look at references to the use of NR for power
system load flow problems which are non-linear and generally expressed
in terms of complex numbers in the polar format. These do converge
well. I haven't written one in J but one written in APL has 11 readable
lines-most
Solving many algebraic equations in many unknowns can be done by eliminating
the unknowns one by one obtaining many algebraic equations in one unknown each,
and then solving these equations numerically.
Example: Two equations in two unknowns. 0 = (x^2)+(y^2)-16 = (y-2) .
0 = y-2 = y(y-2) =
I find it interesting that N-R works for vectors and complex functions (and
mixes of both). Just replace all those scalar functions by their vector
equivalents:
vn=: 1 : '- n * u %. u D.1'
I added a scaling factor; it makes the convergence slower, but it fixes
problems due to precision-loss.
> Is it also possible to solve a system of equation like the following
one… ?
Basically, yes.
Because not only can x = (x1,x2) be a vector, but so can y = (y1,y2) in
this adaptation of your equations:
y1 = a*(1-x1)
y2 = b*(x2-x1^2)
TABULA is an app (distributed as a JAL "addon") which
Hi there,
J looks very interesting. I have no previous experience with array
languages and, being curious, started to experiment. Now, I would
like to solve a system of non-linear equations. I could only examples
solving single equations like this one:
N=: 1 : '- u % u d. 1' NB. Adverb