Info
此问题已关闭。 请重新打开它进行编辑或回答。
I am failing to get the optimized values of the decision variables. Please help
1 次查看(过去 30 天)
显示 更早的评论
My code is as follows:
f = @(x)(((0.0002*((x(1)^2)*x(2)/9.81)^2)-(0.876*(x(1)^2)*x(2)/9.81)/(5.2868+(3310/((x(1)^2)*x(2)/9.81))))/(240.59*(x(1)^3)*(x(2)^2)));
[x,fval] = fminsearch(f,[1480, 0.14]);
Matlab command window's response:
Exiting: Maximum number of function evaluations has been exceeded - increase MaxFunEvals option. Current function value: -1551659114344406700000000000000000000000.000000
0 个评论
回答(1 个)
John D'Errico
2015-3-26
So, you don't think this function might be unbounded? -1.5517e+39 is a really big negative number.
Increasing the iteration limit will not help, just get you closer to -inf.. But again, -1.5517e+39 is reasonably close to -inf. How much more negative do you want it to be?
I think fminsearch is working quite well here. You just don't like the answer it gives you, but that means that you have a poor choice of objective function.
Try plotting the surface. For example, try this:
f = @(x1,x2)(((0.0002*((x1.^2).*x2/9.81).^2)-(0.876*(x1.^2).*x2/9.81)./(5.2868+(3310./((x1.^2).*x2/9.81))))./(240.59*(x1.^3).*(x2.^2)));
ezsurf(f)
Do you honestly think this function is a good choice to optimize?
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!