From 5b859551b0ceee3ef64a63ba2d94641210536347 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 8 May 2024 14:43:02 -0400 Subject: [PATCH] modified: readme.md modified: vis2.html --- readme.md | 14 +++++++++----- vis2.html | 30 ++++++++++++------------------ 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/readme.md b/readme.md index 1492442..5d7eb74 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,14 @@ # Getting Started ```bash -npm install levenbergmarquardt.js@1.0.3 +npm config set registry https://registry.npmjs.org/ +npm i levenbergmarquardt.js ``` ```html - + ``` # Levenberg Marquardt Solver Examples @@ -31,7 +35,7 @@ const equations = (vars) => [ ]; const initialGuess = [0, 0]; -const {solution, status, iterationData} = MultiFunctionSolver.solve(equations, initialGuess); +const {solution, status, iterationData} = LevenbergMarquardtSolver.solve(equations, initialGuess); console.log('Solution:', solution); ``` @@ -57,7 +61,7 @@ const nonlinearEquations = (vars) => [ ]; const initialGuessNonlinear = [1, 1]; -const {solution, status, iterationData} = MultiFunctionSolver.solve(nonlinearEquations, initialGuessNonlinear); +const {solution, status, iterationData} = LevenbergMarquardtSolver.solve(nonlinearEquations, initialGuessNonlinear); console.log('Nonlinear Solution:', solution); ``` @@ -72,6 +76,6 @@ const yData = [1, 2.1, 3.9, 8, 15.9]; const fittingFunction = (params) => xData.map((x, idx) => params[0] * x**2 + params[1] * x + params[2] - yData[idx]); const initialGuessFitting = [1, 1, 1]; -const {solution, status, iterationData} = MultiFunctionSolver.solve(fittingFunction, initialGuessFitting); +const {solution, status, iterationData} = LevenbergMarquardtSolver.solve(fittingFunction, initialGuessFitting); console.log('Fitting Parameters:', solution); ``` \ No newline at end of file diff --git a/vis2.html b/vis2.html index b00b9e1..03055be 100644 --- a/vis2.html +++ b/vis2.html @@ -4,33 +4,27 @@ Combined 3D Visualization with Plotly.js -
-