Ask Your Question

Revision history [back]

Minimize returns vector with incorrect order

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.

([?107.048000000000,?61.9900000000000,?1.47700000000000],(?107.075509604,?1.47442809821,?61.9967170491))

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

click to hide/show revision 2
Removed weird extra ?

Minimize returns vector with incorrect order

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.

([?107.048000000000,?61.9900000000000,?1.47700000000000],(?107.075509604,?1.47442809821,?61.9967170491))
([107.048000000000,61.9900000000000,1.47700000000000],(107.075509604,1.47442809821,61.9967170491))

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