I am trying to write code to animate a resonance curve so that I can visualize changes in a parameter. However, even though my Plot[]
plots values, my Animate[Plot[]]
does not. I am unsure why.
resAmpEqn = a^2 == (f)^2 / (((res)^2 - w^2)^2 + 4 b^2 w^2);
Plot[resAmpEqn[[2]] /. {f -> 1, res -> 10, b -> 1}, {w, 0, 20},
PlotRange -> Full]
Animate[Plot[resAmpEqn[[2]] /. {f -> 1, res -> 10}, {w, 0, 20},
PlotRange -> Full], {b, 0.5, 1.5}]
Does anyone here know why?
resAmpEqn[b_] = .....
and useAnimate[Plot[resAmpEqn[b][[2]] /. {f -> 1, res -> 10}, {w, 0, 20}, PlotRange -> Full], {b, 0.5, 1.5}]
or the dirty variantAnimate[Plot[ resAmpEqn[[2]] /. {f -> 1, res -> 10, b -> bb}, {w, 0, 20}, PlotRange -> Full], {bb, 0.5, 1.5}]
$\endgroup$Animate
, "Animate
generates aManipulate
object containing anAnimator
. " $\endgroup$resAmpEqn[b_] = (f)^2/(((res)^2 - w^2)^2 + 4 b^2 w^2) Animate[Plot[resAmpEqn[b][[2]] /. {f -> 1, res -> 10}, {w, 0, 20}, PlotRange -> Full], {b, 0.5, 1.5}]
$\endgroup$