From 46020cd42f0efc682f93ba81d24f08fd81595001 Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Sat, 3 Feb 2024 14:37:33 +0100 Subject: [PATCH] Update nonlineareq.md --- docs/src/nonlineareq.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/src/nonlineareq.md b/docs/src/nonlineareq.md index d256ee9..891acbb 100644 --- a/docs/src/nonlineareq.md +++ b/docs/src/nonlineareq.md @@ -8,16 +8,16 @@ Assume that you have a residual system that you want to solve. This means that i ``` function F(x) x^2 - end - - function FJ(Jx, x) - x^2, 2x - end +end - prob_obj = NLSolvers.ScalarObjective( - f=F, - fg=FJ, - ) +function FJ(Jx, x) + x^2, 2x +end + +prob_obj = NLSolvers.ScalarObjective( + f=F, + fg=FJ, +) prob = NEqProblem(prob_obj; inplace = false) @@ -86,7 +86,7 @@ function F_jacobian_powell!(Fx, Jx, x) Fx, Jx end -prob_obj = VectorObjective(F=F_powell!, J=F_jacobian_powell!) +prob_obj = VectorObjective(F=F_powell!, FJ=F_jacobian_powell!) prob = NEqProblem(prob_obj) x0 = [-1.0, 0.0, 0.0]