How can I vary a vector's element order in an optimization routine?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to set up an optimization routine which will take a vector, say, [0, 10, 20, 30, 40], and vary the element order in order to minimize a function. To illustrate, potential options could be [40, 30, 20, 10, 0] or [20, 40, 30, 10, 0]. The vector elements will be provided by myself, and to be clear, I don't want the values to change, I just want to vary the order.
The function I'm trying to minimize is nonlinear.
There may be a simple way to do this, but at the moment I'm having trouble with the implementation. If it helps, I have access to both the standard and global optimization toolboxes.
I really appreciate any ideas that you all may have on the matter.
0 comentarios
Respuestas (1)
Torsten
el 7 de Nov. de 2014
Use "perms" if the vector length is not that big (<=10).
Best wishes
Torsten.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!