✔ 最佳答案
本文来自CSDN博客,转载请标明出处:
http://blog.csdn.net/aris_zzy/archive/2008/03/19/2196865.aspx
matlab求解非线性方程组 fsolve - Solve system of nonlinear equations
最近有人问我matlab求解方程组的问题,
下面提供了fsolve函数help,但要有几点需要注意
1.方程组的有解性
2.方程组解是否唯一
3.x0的选取,如果解不唯一,不同的x0可能会得到不同的解
fsolve - Solve system of nonlinear equations
Equation
Solves a problem specified by
F(x) = 0
for x, where x is a vector and F(x) is a function that returns a vector value.
Syntax
x = fsolve(fun,x0)
x = fsolve(fun,x0,options)
x = fsolve(problem)
[x,fval] = fsolve(fun,x0)
[x,fval,exitflag] = fsolve(...)
[x,fval,exitflag,output] = fsolve(...)
[x,fval,exitflag,output,jacobian] = fsolve(...)
Description
fsolve finds a root (zero) of a system of nonlinear equations.
x = fsolve(fun,x0) starts at x0 and tries to solve the equations described in fun.
x = fsolve(fun,x0,options) solves the equations with the optimization options specified in the structure options. Use optimset to set these options.
x = fsolve(problem) solves problem, where problem is a structure described in Input Arguments.
Create the structure problem by exporting a problem from Optimization Tool, as described in Exporting to the MATLAB Workspace.
[x,fval] = fsolve(fun,x0) returns the value of the objective function fun at the solution x.
[x,fval,exitflag] = fsolve(...) returns a value exitflag that describes the exit condition.
[x,fval,exitflag,output] = fsolve(...) returns a structure output that contains information about the optimization.
[x,fval,exitflag,output,jacobian] = fsolve(...) returns the Jacobian of fun at the solution x.
Passing Extra Parameters explains how to parameterize the objective function fun, if necessary.