How should I manage the input on fmincon function?
Show older comments
Hi there,
I am using the fmincon function in order to minimize an image registration problem.
After preprocessing and several Gaussian reductions I obtain two data volumes/matrix (100,100,400 every one).
To optimize the result, every slice of the matrix can be moved in three axis (x, y, z). So, I need a 3(x,y,z)x400=1200 variables for every volume as initial guess. I pass them as a vector, InitialVector. The data volumes are passed as global variables. I am using the limited memory BFGS.
My problem is with respect the A and b variables of input.
How should I configure them? What size?
options = optimset('Algorithm','interior-point','Hessian',{'lbfgs',1000}); [FinalValue,fval,exitflag,output]=fmincon(@Optimizer,InitialVector,A,b,[],[],[],[],[],options);
Any suggestion will be truly appreciated!
Answers (2)
Shashank Prasanna
on 30 Jan 2013
0 votes
A and b are linear constraints, if you don't have any linear constraints just use empty brackets. If you do then see the doc on how to phrase them. A has coefficients for the linear combination of x to be less than b:
Also I'd advise against global variables and passing extra parameters through anonymous variables as follows:
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!