新手求助 关于用Fsolve解非线性方程组。
显示 更早的评论
首先这是我的m函数文件
function q=myfun(x)
q=[x(1)+x(2)-98;
x(1)^(1/3)+x(2)^(1/3)-2]
然后在调用
x=fsolve('myfun',[2,-1],optimset('Display','off'))
得到结果
x =
98.4271 - 0.5792i -0.0914 + 0.0000i 前面还有很多无用的东西
这结果是不对的 结果是 125 - 27 我想知道错在哪里 跪求各位大神解答! 还有就是这个方程的同构是能求出来的
function q=myfun(x)
q=[x(1)+x(2)-2;
x(1)^3+x(2)^3-98]
x=fsolve('myfun',[2,-1],optimset('Display','off'))
结果 x =
5.0000 -3.0000
这有是问什么? 跪求了 这是老师给我的作业
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!