新手求助 关于用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!