Choose parameters which minimize a function
6 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
dpb
2015-7-26
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Direct Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!