# Help me understand what Map[Max[#] - Min[#] &, ttt, {2}] does [closed]

ttt =
Table[(z /. FindRoot[eqn1[x, z, y], {z, z0}]),
{x, 2.5*10^9, 3.5*10^9, 10^8/5},
{y, 0.6 10^-15, 1.4 10^-15, 10^-16},
{z0, 0.100, 0.110, 0.005} ];

MatrixForm[ttttt = Map[Max[#] - Min[#] &, ttt, {2}]];

ListPlot[Transpose[ttttt], Joined -> True, PlotMarkers -> Automatic, PlotRange -> All];


I know what FindRoot does, it finds the roots of z of eqn1[x, z, y] == 0, and z0 is the initial value where FindRoot searches for a root.

So the first expression simply finds roots of z about 0.1, 0.11, 0.005 while iterating x and y.

I'm puzzled by the second expression, the one involving Map[Max[#] - Min[#] &, ttt, {2}]. I think it searches for the maximum and subtracts the minimum? Does it pick from a single root near one value of z0 or for all three simultaneously?

-

## closed as off-topic by Yves Klett, Öskå, Michael E2, Mr.Wizard♦Jul 25 '14 at 17:38

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Map shows that {2} applies functions to the elements at level 2, in your case a triplet of z values for a given value of x and y. –  Timothy Wofford Jul 25 '14 at 16:40
This question appears to be off-topic because it is too localized und not useful for future visitors. –  Yves Klett Jul 25 '14 at 17:05

ttt will be a 51 x 9 matrix of triplets, the roots of eqn1 found near to the three values of z0 for the 51 values of x and the 9 values of y. Map[Max[#] - Min[#] &, ttt, {2}]] works at level 2, the level of the triplets. It finds the span of those roots; i.e., Max @ {root1, root2, root3} - Min @ {root1, root2, root3}, and returns a 51 x 9 matrix of those span values.