|
On 2/8/2012 4:24 PM, Akshay wrote:
> I am currently using fminlbfgs to determine the paramters in a bspline
> registration. I am trying to make sure the deformation is diffemorphic
> by constraining the maximum deformation. is it possible to return
> function values through the output function?
>
> For ex, if the current iteration has a function value > threshold, i
> need to return inf so that the iteration goes back one step.
>
> Please help me regarding this.
I am not familiar with fminlbfgs.
But I can tell you that output functions are for observing iterations,
not changing things inside.
Generally, if you want your objective function to return a value, you
have to program the objective function to return that value. You could
have your objective function, say objfun, take two arguments, x and
threshold, and call @(x)objfun(x,threshold). See
http://www.mathworks.com/help/toolbox/optim/ug/brhkghv-7.html
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
|