Question: get the input values corresponding to minimum

Hi, I am new to maple. I have written a program to work out every combination of different sets of numbers. It runs a procedure on each different combination and then finds the smallest value . I'd be grateful if somebody could tell me how to get maple to return me the values corresponding to the minimum of the output values.

Summary

Starts with sets of numbers eg. ([1,2],[2,3],[3,4],[5,6],[4,5]), then works out every possible combination of these ([ ], [ ], [ ], [ ], [ ], etc.), then carries out procedure on each set returning one value for each of them. Then it finds the lowest of these (min[defined]( )  ). How do I find the values of the set from ([ ], [ ], [ ], [ ], [ ], etc.) that produced the min.

Using

Error := [seq ( Err1 ( a [5*j-4],  a [5*j-3],  a [5*j-2],  a [5*j-1], a [5*j], j=1..N/5 ) ]   To get the one value before the minimum is found. Where Err1 is the procedure, a is the ([ ], [ ], [ ], [ ], [ ], etc.)   that's had op( ) used on it and N is the total number in this set. Thanks

 

Please Wait...