《Broyden方法求解非线性方程组的Matlab实现》由会员分享,可在线阅读,更多相关《Broyden方法求解非线性方程组的Matlab实现(7页珍藏版)》请在人人文库网上搜索。
1、Broyden方法求解非线性方程组的Matlab实现注:matlab代码来自网络,仅供学习参考。1. 把以下代码复制在一个.m文件上function sol, it_hist, ierr = brsola(x,f,tol, parms)% Broydens Method solver, globally convergent% solver for f(x) = 0, Armijo rule, one vector storage% This code comes with no guarantee or warranty of any kind.% function sol, it_hist。
2、, ierr = brsola(x,f,tol,parms)% inputs:% initial iterate = x% function = f% tol = atol, rtol relative/absolute% error tolerances for the nonlinear iteration% parms = maxit, maxdim% maxit = maxmium number of nonlinear iterations% default = 40% maxdim = maximum number of Broyden iterations% before res。
3、tart, so maxdim-1 vectors are % stored% default = 40% output:% sol = solution% it_hist(maxit,3) = scaled l2 norms of nonlinear residuals% for the iteration,