I'm trying to plot solution of system of equations as a function of parameter
Manipulate[{
Quiet[sol = Solve[{Ka*P*L*L == PLL, P0 == P + PLL, r*P0 == L + 2*PLL}, {P, L, PLL}]][[3]];
complex[x_] := PLL /. sol[[3]] /. r -> x;
Plot[{
Hold[Evaluate@D[complex[r], r]],
Hold[Evaluate@D[-complex[r], {r, 2}]]
} // Release,
{r, 0.1, 4},
PlotStyle -> {Red, Blue}
]},
{Ka, 10000, 10000},
{P0, 0.5, 1}
]
My plot has gaps! Why and how I can eliminate them?
Answer
Thre is a small imaginary part due to numerical errors. Just add Re
inside Evaluate
:
... Evaluate@Re@D[...] ...
Comments
Post a Comment