Help with setting up an optimization problem
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Cole
am 8 Okt. 2014
Beantwortet: Alan Weiss
am 13 Okt. 2014
Hi,
I have a question about setting up an optimization problem. I have a function that looks like this:
[ correlation ] = my_function ( input1, input2, input3, optParm )
My_function calls a bunch of different image processing sub routines that I've written and inputs 1, 2 and 3 are arrays of photos that need to be loaded into the function. The function basically processes 100 images and then compares the automatically measured results to the manually measured results. Anyway, I don't know if the details of my program really matter. I'm having trouble setting up the optimization portion of this.
This is what I have so far; most of which is taken from the help files:
options = optimoptions(@fminunc,'Algorithm','quasi-newton');
optParm0 = 10;
[optParm,fval,exitflag,output] = fminunc(@CP_Process_All,optParm0,options);
I want the optimizer to try all different values of optParm, starting with 10 and maximize the correlation. The error that I'm getting is "not enough input parameters". In all the examples, the objective function just has a single input value. I don't know how to set it up this way because my function needs the input arrays to run properly.
Any help would be greatly appreciated!
Thank you!
0 Kommentare
Akzeptierte Antwort
Alan Weiss
am 13 Okt. 2014
However, I wonder if you have a discrete problem, where your optParm has to be an integer. If so, then you cannot use Optimization Toolbox functions, because they require that the decision variable (unknown parameter) is a continuous one.
Alan Weiss
MATLAB mathematical toolbox documentation
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!