From: Alan Weiss on 16 Apr 2010 07:26 Take a look at the Getting Started example for help understanding basics of the ptimization Toolbox: http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brg0p3g-1.html The output you related indicates that fmincon was successful. "Terminated" simply means stopped, fmincon is telling you why it thinks it found the answer. Alan Weiss MATLAB mathematical toolbox documentation On 4/15/2010 12:00 PM, kay wrote: > some more information for my problem: > width=x(1) > height=x(2) > > as u can see in the code, i wrote the upper n lower boundary : > lb = [10 0]; > ub = [20,inf]; > > but then how do the function knows it is for which variable? i mean, i > have 2 variables x(1) and x(2) but..how do i write the boundary for both > of my variables? > anyway, is the code for boundary that i wrote is correct? > one more thing, when i change my start point to [20 1], this is the output: > > Max Line search Directional First-order Iter F-count f(x) constraint > steplength derivative optimality 0 3 20 0 1 6 0.049751 -0.002494 1 -19.9 > 0.995 2 9 1.53649e-007 -7.702e-009 1 -0.0498 8.29e-006 3 12 5e-008 > -2.506e-009 1 -1.04e-007 1.52e-017 > Optimization terminated: first-order optimality measure less > than options.TolFun and maximum constraint violation is less > than options.TolCon. > Active inequalities (to within options.TolCon = 1e-006): > lower upper ineqlin ineqnonlin > 2 1 > > > -->the final value from the optimtool gives me value of x(1)=19.95 and > x(2)=0 and objective function value = 5.00000e-8 (iteration 3) > how do interpret the output? i dont understand.please help ..
|
Pages: 1 Prev: Export COMSOL FEM mesh to MATLAB Next: Real-Time Windows Target and RS232 communication? |