matlab怎么用fsolve函数解非线性方程组

 我来答
百度网友db4b04636
推荐于2016-01-27 · TA获得超过2913个赞
知道小有建树答主
回答量:834
采纳率:92%
帮助的人:326万
展开全部
function F = myfun(x)
F = x*x*x-[1,2;3,4];
Save this function file as myfun.m somewhereon your MATLAB path. Next, set up an initial point and optionsand call fsolve:
x0 = ones(2,2); % Make a starting guess at the solution
options = optimoptions('fsolve','Display','off'); % Turn off display
[x,Fval,exitflag] = fsolve(@myfun,x0,options)
The solution is
x =
-0.1291 0.8602
1.2903 1.1612

Fval =
1.0e-009 *
-0.1621 0.0780
0.1167 -0.0465

exitflag =
1
and the residual is close to zero.
sum(sum(Fval.*Fval))
ans =
4.8133e-20
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式