Howdy there! I'm having some trouble using the MaximalBy function in Mathematica. I'm feeding the function a list of ordered pairs, indexing groups of these pairs within the list, and then printing the maximum values. My hope would be that the print statement would simply be a bunch of unique ordered pairs(every pair in the original list is unique). However, I'm getting a list full of repeated entries and empty list. Any ideas as to what could be causing this? Here is my code:
Do[Print[MaximalBy[Table[values[[i]], {i, 100 j + 1, 100 z}], Last]], {j, 0, 1}, {z, 1, 2}]
And here is the result:
{{0.007375,0.00173}}
{{0.022375,0.00195}}
{}
{{0.022375,0.00195}}
And here is an idea of what I would like to see:
{{0.007375,0.00173}}
{{0.022375,0.00195}}
Thanks in advance!