options=optimset('Maxfuneval',1000); %修改为1000次CODE:
function solve_eqs
clear all;clc
options=optimset('Maxfuneval',1000);
global m;
m=0.01;
for i=1:51
[y fval]=fsolve(@myf02,[0.004,0.7,1.2],options);
n(1:3,i)=y;
nn(1:3,i)=fval;
m=m+0.02;
end
n
nn
function f=myf02(x)
global m;
f(1)=7.935516634*m^3*x(3)^3-x(1)^2*x(2)^2;
f(2)=-0.12*m-0.0003*x(1)-0.011285-log10(x(2));
f(3)=0.14*m-0.024*x(1)+0.027595-log10(x(3));
解和残差:
n =
Columns 1 through 13
0.0032 0.0172 0.0368 0.0618 0.0913 0.1249 0.1624 0.2036 0.2485 0.2970 0.3489 0.4041 0.4628
0.9717 0.9663 0.9610 0.9556 0.9504 0.9451 0.9399 0.9347 0.9295 0.9243 0.9192 0.9141 0.9090
1.0689 1.0749 1.0807 1.0862 1.0915 1.0965 1.1013 1.1059 1.1103 1.1145 1.1185 1.1223 1.1259
Columns 14 through 26
0.5247 0.5898 0.6581 0.7296 0.8042 0.8818 0.9625 1.0461 1.1327 1.2222 1.3146 1.4097 1.5076
0.9040 0.8990 0.8940 0.8890 0.8840 0.8791 0.8742 0.8694 0.8645 0.8597 0.8549 0.8501 0.8454
1.1293 1.1325 1.1355 1.1384 1.1410 1.1435 1.1458 1.1479 1.1498 1.1515 1.1530 1.1544 1.1556
Columns 27 through 39
1.6083 1.7116 1.8176 1.9261 2.0372 2.1508 2.2668 2.3852 2.5060 2.6290 2.7543 2.8819 3.0115
0.8407 0.8360 0.8313 0.8267 0.8221 0.8175 0.8129 0.8083 0.8038 0.7993 0.7949 0.7904 0.7860
1.1566 1.1575 1.1582 1.1587 1.1591 1.1592 1.1593 1.1592 1.1589 1.1585 1.1580 1.1573 1.1564
Columns 40 through 51
3.1433 3.2772 3.4130 3.5508 3.6906 3.8321 3.9756 4.1208 4.2677 4.4163 4.5666 4.7184
0.7816 0.7772 0.7728 0.7685 0.7642 0.7599 0.7557 0.7514 0.7472 0.7430 0.7388 0.7347
1.1555 1.1544 1.1531 1.1518 1.1503 1.1487 1.1470 1.1452 1.1433 1.1413 1.1392 1.1370
残差:
nn =
1.0e-005 *
Columns 1 through 13
-0.0001 -0.8662 -0.0512 -0.0349 -0.0142 -0.0356 -0.0006 -0.1149 -0.0005 -0.0000 -0.0572 -0.0000 -0.0000
0.0197 0.0000 -0.0000 0.0000 0.0076 0.0065 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0006 0.0000 0.0009 0.0406 0.0306 0.0000 0.0001 0.0000 0.0000 0.0001 0.0000 0.0000
Columns 14 through 26
-0.0447 -0.0000 -0.0000 -0.0003 -0.0005 -0.0005 -0.0002 -0.0001 -0.0000 -0.0000 0.0000 -0.0000 -0.0000
0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0012 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 27 through 39
-0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0003 0.0005 0.0009 0.0013 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 -0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Columns 40 through 51
0.0000 -0.0000 -0.0000 0.0005 0.0005 0.0008 0.0000 0.0000 0.0000 0.0000 -0.0002 0.0000
-0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000 0 0.0000 0 0.0000 0.0000 -0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000