Minimize returns vector with incorrect order

asked 2013-10-16 13:03:14 -0500

ricochet1k gravatar image

updated 2013-10-16 13:04:31 -0500

Minimize seems to be returning a vector ordered as if the input variables were sorted in alphabetical order, rather than in the order passed in. For example:

RVxayaxc = minimize( FAllaac(xa, ya, xc), [ixa,iya,ixc])
[ixa,iya,ixc], RVxayaxc

Gives the following. Note that the last two items are now reversed.


Is there any way to either avoid this or get the variable names for each item in the result?

edit retag flag offensive close merge delete



Note that you are minimizing, and that the two are not *exactly* reversed, but the numbers are indeed different. Without knowing the function, it's hard to say whether this is actually wrong. Also, various algorithms may start at a point but then do some semi-random jumps to seek a minimum... Anyway, a little more detail is probably necessary for us to help. Thanks!

kcrisman gravatar imagekcrisman ( 2013-10-16 13:23:38 -0500 )edit