0
$\begingroup$

I want to plot the following NMinimize function:

enter image description here

I used

GGPlot = Plot[GG[DM], {DM, 0.02, 10}, PlotRange -> All]

But I get nothing! My code is

GG[DM_] := (
  \[CapitalLambda]u = \!\(\*
TagBox[
RowBox[{"(", "", GridBox[{
{"\[Theta]", "\[Phi]", "0", 
RowBox[{"2", "\[Theta]"}]},
{"0", "6", 
RowBox[{"8", "DM"}], "\[Phi]"},
{"0", 
RowBox[{"42", "+", "DM"}], "\[Theta]", "0"},
{"5", "0", "\[Phi]", "20"}
},
GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.7]}, 
Offset[0.27999999999999997`]}, "Rows" -> {
Offset[0.2], {
Offset[0.4]}, 
Offset[0.2]}}], "", ")"}],
Function[BoxForm`e$, 
MatrixForm[BoxForm`e$]]]\);
  {\[Omega]1, \[Omega]2, \[Omega]3, \[Omega]4} = 
   Chop[Eigenvalues[\[CapitalLambda]u]];

  FMin = 1/
    2 Chop[NMinimize[{Tr[\[CapitalLambda]u] + (Abs[\[Omega]1] + 
          Abs[\[Omega]1] + Abs[\[Omega]1] + 
          Abs[\[Omega]1]), {\[Theta]} \[Element] 
        Interval[{0, (3 \[Pi])/2}], {\[Phi]} \[Element] 
        Interval[{0, (3 \[Pi])/2}]}, {\[Theta], \[Phi]}]];  
  (1 - Sqrt[FMin]) )

I want to plot this NMinimize function,I want to plot the following NMinimize function:I want to plot the following NMinimize

$\endgroup$
2
  • 2
    $\begingroup$ Please provide your complete code , not an image. Thanks! $\endgroup$ Jan 23, 2020 at 17:15
  • $\begingroup$ I have added the code. Please take a look. Thanks $\endgroup$
    – Bekaso
    Jan 23, 2020 at 19:36

1 Answer 1

1
$\begingroup$

I made a little change to the four times Abs[w1]. Think it was a typo.

\[CapitalLambda]u = {{\[Theta], \[Phi], 0, 2*\[Theta]}, 
   {0, 6, 8*DM, \[Phi]}, {0, DM + 42, \[Theta], 0}, 
   {5, 0, \[Phi], 20}}

{\[Omega]1, \[Omega]2, \[Omega]3, \[Omega]4} = 
Eigenvalues[\[CapitalLambda]u]

ff[DM_, \[Theta]_, \[Phi]_] = {Tr[\[CapitalLambda]u] + 
Sqrt[\[Omega]1^2] + 
          Sqrt[\[Omega]2^2] + Sqrt[\[Omega]3^2] + 
          Sqrt[\[Omega]4^2], 
    0 < \[Theta] < (3 \[Pi])/2 && 0 < \[Phi] < (3 \[Pi])/2} // Simplify

nmin[DM_?NumericQ] := 
  NMinimize[ff[DM, \[Theta], \[Phi]], {\[Theta], \[Phi]}]

GG[DM_] := 1 - Sqrt[1/2*First@nmin[DM]]

GGPlot = Plot[GG[DM], {DM, 0.02, 10}, PlotRange -> All, 
            PlotPoints -> 15, MaxRecursion -> 1]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.