I want to plot the piecewise function (FP), which is define as:
$$FP=\cases{1,&$\text{Eta}<J$\\ \frac{1-\left| \text{Gam}\right| }{2}, &$\text{Eta}=J$\\ \frac{\left| \text{Gam}*J\right| }{\text{Eta}}, &$\text{Eta}>J$\\}$$
where $J=1$, $\text{Gam}=\frac{8}{10}$, and $\text{Eta}=\sqrt{B^2+\text{Gam}^2 J^2}$ According to the ref. "10.1103/PhysRevLett.88.107901" I already know that the resulting curve should be as shown in Fig. (a). But I get Fig. (b).
The code I used is:
J = 1; Gam = 8/10;
Eta = Sqrt[B^2 + J^2 Gam^2];
FP = Piecewise[{{1, Eta < J}, {(1 - Abs[Gam])/2,
Eta == J}, {(Abs[J Gam])/Eta, Eta > J}}] ;
Plot[FP, {B, 0, 3}, Exclusions -> None]
Did I miss something?
Plot
will not plot isolated points. Those have to be added by the user. The optionEpilog
is a common way to do that. $\endgroup$ – Michael E2 Aug 7 '20 at 17:44ListLinePlot@Table[FP, {B, 0, 3, 1/100}]
. It looks close to Fig. (a), but mathematically, it's inaccurate. $\endgroup$ – Michael E2 Aug 7 '20 at 17:48