马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
clear
x0 = [3.955164E-03,4.855234E-03,4.855234E-03,4.855234E-03,1.775628E-03];
mcanshu55 = 'abs(0.19700000086079e-14+[2.5602e-041 1.0355e-053 1.8955e-033 8.6083e-024 2.4193e-043]*[x(1);x(2);x(3);x(4);x(5)]+[x(1) x(2) x(3) x(4) x(5)]*[-2.5664e-041 -1.6988e-061 -7.7855e-046 2.2380e-049 -7.8867e-057;0 4.5438e-062 -3.1368e-058 9.0490e-062 -3.1903e-069;0 0 -1.8915e-033 1.6579e-041 -1.0026e-048;0 0 0 3.7616e-032 2.1174e-051;0 0 0 0 -2.4194e-043]*[x(1);x(2);x(3);x(4);x(5)]-1.970001259803308e-15)';
lb=[3.955164E-03*0.2,4.855234E-03*0.2,4.855234E-03*0.2,4.855234E-03*0.2,1.775628E-03*0.2];
ub=[3.955164E-03*1.8,4.855234E-03*1.8,4.855234E-03*1.8,4.855234E-03*1.8,1.775628E-03*1.8];
format long;x0
options = optimset('largescale','off','display','iter');
options=optimset(options,'tolx',1e-100);
options=optimset(options,'tolfun',1e-100);
[x,fval,exitflag,output] = fmincon(mcanshu55,x0,[],[],[],[],lb,ub,[],[],options);
运行后结果如下:
x =
0.00395516400000 0.00485523400000 0.00485523400000 0.00485523400000 0.00177562800000
fval =
1.251153612607804e-021
exitflag =
1
output =
iterations: 1
funcCount: 13
stepsize: 1
algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'
firstorderopt: 3.944304526105059e-023
cgiterations: []
请问一下,为什么不发生跌代啊?请加我的QQ365400204,在线等待,谢谢 |