NewtonRaphson

버전 2.0 (343 KB) 작성자: Mark Mikofski
Yet another solver that uses the backslash function to solve a set of non-linear equations
다운로드 수: 15.4K
업데이트 날짜: 2022/10/24
Although this is the most basic non-linear solver, it is surprisingly powerful. It is based on the Newton-Raphson method in chapter 9.6-7 of Numerical Recipes in C. In general for well behaved functions and decent initial guesses, its convergence is at least quadratic. However it may fail if the there are local minimums, the condition of the Jacobian is poor or the initial guess is relatively far from the solution. When convergence is negative, it will attempt to backtrack and line-search. It was validated with fsolve from the MATLAB Optimization Toolbox and IPOPT (https://projects.coin-or.org/Ipopt). Please see the help comments and the example.
Note: LSQ curve-fit type problems can also be solved using newtonraphson. These are problems where there are many data for a single function, but the coefficients of the function are unknown. Since there is more data than unknowns, and the residual is minimized for each data point, the Jacobian is not square. These problems usually exit with flag 2: "May have converged." and the solution is the best fit in the "least-squares" sense.
Credit: Moody diagram is from Wikipedia
http://upload.wikimedia.org/wikipedia/commons/8/80/Moody_diagram.jpg

인용 양식

Mark Mikofski (2024). NewtonRaphson (https://github.com/mikofski/NewtonRaphson), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
2.0

Add BSD-3 license.

1.6.0.1

connect to github

1.6.0.0

* allow sparse matrices, replace cond() with condest()
* check if Jstar has NaN or Inf, return NaN or Inf for cond() and return exitflag: -1, matrix is singular.
* fix bug: max iteration detection and exitflag reporting typos

1.5.0.0

version 0.4 - exit if any dx is nan or inf, allow lsq curve-fit type problems.

1.4.0.0

(1) fix need dummy vars dx and convergence to display 0th iteration bug, and (2) if f isnan or isinf need to set lambda2 and f2 before continue bug (3) also reattach moody chart

1.2.0.0

v0.3: Display RCOND and lambda each step. Use ducktyping in funwrapper. Remove Ftyp and F scaling. Use backtracking line search. Output messages, exitflag and min relative step.

1.1.0.0

remove TypicalX and FinDiffRelStep, change feval to evalf & new example solves pipe flow problem using implicit Colebrook equation

1.0.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.