Choose parameters which minimize a function
Ältere Kommentare anzeigen
I have two arrays 13x2 with points x,y for the first array and x',y' for the second array. I also have a function of x and x' and i want to chose 8 x and 8 x' from the arrays, such that minimize this function. This function takes arrays of 8 with x and x'. Have you got any idea?
Antworten (1)
dpb
am 26 Jul. 2015
Not sure I follow the intend exactly, but if I understand you wish to pick the subset of (8) values from each of two larger sets of (13) that minimizes a function of the two. Since
>> nchoosek(13,8)
ans =
1287
and there are two combinations of these, brute-force enumeration will be time-consuming.
The thought that comes to mind would be to use one of the minimization routines and solve in a least squares sense (linear or nonlinear, depending on the functional form is the reason for the genericity rather than a specific routine) and the choose the coefficients that are nearest in magnitude to those. That doesn't guarantee that is the minimum but would likely be a reasonable guesstimate unless the model is extremelty sensitive to one (or more) coefficient.
Kategorien
Mehr zu Direct Search finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!