brute force procedure for a function
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear collegues,
I have a question about design of flexiable brute force procedure over functions parameters. suppose I have a function
kpi = func(a,b,c)
in brute force function i want to select only for which parameters optimize and in which range e.g.: Optimization over a = 1:5 and c= 100:125 and b = 2
result = f_opt(@func,[1 0 1], {1:5,2,100:125})
the number of parameters in func must be canchagable. func is not vectorized.
What is the best way to design such function?
0 Commenti
Risposte (1)
Yu Jiang
il 6 Ago 2014
If you would like to fix one parameter, e.g., b and optimize the function by finding appropriate a and c in their given range, you may try the following
x = fmincon(@(x) func(x(1),b,x(2)), x0, [], [], [], [], [1 100], [5 125])
where x0 is the initial condition.
0 Commenti
Vedere anche
Categorie
Scopri di più su Linear Programming and Mixed-Integer Linear Programming in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!