Let's take this example:
DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}]
How do I retrieve the minimum value and position of the minimum of a plot from the plot? How do I tell Mathematica to mark the position of the minimum/minima within the plot?
And for ContourPlot
s
ContourPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}]
Is there a way to mark the exact minimum position within the plot even though it's a contour plot?
Yes, Jens and Szabolcs, that would be the best way if i could manage to write the code for that. I'm still a beginner with mathematica and haven't managed so far to cope with that problem because....well i think i have to post a piece of my code to show it. I have deleted most of the variables and replaced them by constants for simplicity reasons:
eislexpl[epsilon_, n2_, x_] := 28 (epsilon)^2 - 1 +
((-2 Log[E^(1/2) x])/x^2 + (2.7(0.3 - epsilon))/x +
(10 epsilon^2 n2^(3/2))/x^(3/2));
eislminx2[epsilon_?NumericQ, n2_?NumericQ] :=
(minx = FindArgMin[{eislexpl[epsilon, n2, x], 0 < x}, x];
eislexpl[epsilon, n2, minx]);
ueislexpl[epsilon_, h_, n1_, n2_] :=
n1 (40 epsilon^2 - 1) + (1 -1.27 ) (1 + (n1 - 1) HeavisideTheta[1 - n1] -
(-1 + Exp[-(n1 - 1)]) HeavisideTheta[n1 - 1]) + n2 eislminx2[epsilon, n2] +
(h - n1 - n2) (28 epsilon^2 - 1);
ueislexpl[epsilon_, h_, n1_, n2_] is the function i need to find the minimum for. But the problem for me is, that it calls this function eislminx[epsilon_?NumericQ,n2_?NumericQ]. So my problem is that in order to have a function that mathematica is able to find a minimum for, i have to plug n2 in eislminx[epsilon_?NumericQ,n2_?NumericQ], so that this part of ueislexpl[epsilon_, h_, n1_, n2_] determined, but at the same time i want to find the minimum for ueislexpl[epsilon_, h_, n1_, n2_] with respect to n2. So if anybody know how to find the minimum of ueislexpl[epsilon_, h_, n1_, n2_] with respect to n2 and n1 i would be happy to learn how.
Thanks for the help.
Well, my actual question has been answered by kguler, thanks again ;) And the question of how to find the minimum of that function above i will source out to here: Finding the minimum of a function
FindMinimum
,Minimize
, andEpilog
. $\endgroup$