一千萬個為什麽

搜索

如何找到區域的最小值和最大值?

我有一個像下面這樣的regionplot: m1 = 0.547; m1p = 0.958; m2 = 0.137; r1 = Sqrt[m1^2 + (Sqrt[w1^2 - m2^2] + Sqrt[w2^2 - m2^2])^2]//Expand; r2 = Sqrt[m1^2 + (Sqrt[w1^2 - m2^2] - Sqrt[w2^2 - m2^2])^2]//Expand; RegionPlot[ m1p - w1 - w2 < Re[r1] && m1p - w1 - w2 > Re[r2], {w1, .1, .25}, {w2, .1, .25}, BoundaryStyle -> Blue, FrameLabel -> {"w1", "w2"}]

如何找到w1和w2的最小值和最大值?

最佳答案

如果你對你的情節感到滿意,你可以回收它: rp = RegionPlot[m1p - w1 - w2 < Re[r1] && m1p - w1 - w2 > Re[r2], {w1, .1, .25}, {w2, .1, .25}, BoundaryStyle -> Blue, FrameLabel -> {"w1", "w2"}];

minw1 = [email protected][[1, 1, All, 1]]; maxw1 = [email protected][[1, 1, All, 1]]; minw2 = [email protected][[1, 1, All, 2]]; maxw2 = [email protected][[1, 1, All, 2]];

Show[rp, Graphics[{Red, Line[{{minw1, 0}, {minw1, 0.5}}]}], Graphics[{Red, Line[{{maxw1, 0}, {maxw1, 0.5}}]}], Graphics[{Red, Line[{{0, minw2}, {0.5, minw2}}]}], Graphics[{Red, Line[{{0, maxw2}, {0.5, maxw2}}]}]]

轉載註明原文: 如何找到區域的最小值和最大值?