I am trying to find the maximum value in a list. I can find the maximum value, but how can I find the value of the associated parameter at the maximum? (I don't want the index of the element in the list of the parameter since the actual list (of t in the example) is so long, so I want to get t=4 for the following example instead of its index:3)
v = Table[
TR1 + TR2 /. Flatten[{Solve[TR1 - t == 0, TR1], TR2 -> t + 1}], {t,
2, 4, 1}]
tstar = Max[v]
v = Table[{t, TR1 + TR2 /. Flatten[{Solve[TR1 - t == 0, TR1], TR2 -> t + 1}]}, {t, 2, 4, 1}]; tstar = MaximalBy[v, Last][[1, 1]]
$\endgroup$list = RandomReal[1, 100]; Position[list, Max[list]]
$\endgroup$