MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB数学相关] matlab解方程组,求高手不吝指教 (https://www.labfans.com/bbs/showthread.php?t=14117)

箫风禅月 2011-11-29 16:54

matlab解方程组,求高手不吝指教
 
3 个附件
方程为:(求x1,x2,x3,即a,b,c)
第一个:((2*a+3*b+c)^2*(a+b)*(1-c))/((1-a-b)*(2-0.5*a)^0.5*(4+1.5*a+2*b)^1.5)-3.46e11;
第二个:((2*a+3*b+c)^3*(a+b)*(1-c))/((1-a-b)*(1-b-c)^0.5*(4+1.5*a+2*b)^2)-0.966;
第三个:((2*a+3*b+c)*(a+b)*c)/((a+b)*(1-c)*(1-b-c))-1.176;

我编程为:
function f=my1(x)
a=x(1);
b=x(2);
c=x(3);
f(1)=((2*a+3*b+c)^2*(a+b)*(1-c))/((1-a-b)*(2-0.5*a)^0.5*(4+1.5*a+2*b)^1.5)-3.46e11;
f(2)=((2*a+3*b+c)^3*(a+b)*(1-c))/((1-a-b)*(1-b-c)^0.5*(4+1.5*a+2*b)^2)-0.966;
f(3)=((2*a+3*b+c)*(a+b)*c)/((a+b)*(1-c)*(1-b-c))-1.176;

导入matlab中:
>>x0=[3.9 0.5 0];
>> f=fsolve('my1',x0)

出现:

No solution found.

fsolve stopped because the last step was ineffective. However, the vector of function
values is not near zero, as measured by the default value of the function tolerance.

<stopping criteria details>


f =

3.0832 -1.7871 0.6274

请问这是怎么回事呀?怎么才能求出结果呢?本人菜鸟,请高手帮忙,感激不尽!

honelight 2011-12-03 12:44

回复: matlab解方程组,求高手不吝指教
 
首先,可能是你的x0的范围没有设对,尝试一下将范围扩大
其次,这个方程组你确定有解吗?当非线性方程组无解然而你用fsolve尝试的时候会出现类似于此的信息

aiyaolei 2011-12-07 14:54

回复: matlab解方程组,求高手不吝指教
 
math,matlab辅导 QQ:291873404(数学博士),


所有时间均为北京时间。现在的时间是 12:53

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.