The following code produces the error message when exported to CDF in the title of this question. Although I have seen similar issues on SE, the problem is manifest by the "blinking" of the plot output's cell bracket. My goal is to export this code to CDF but am stymied now.
Manipulate[If[s = 20, s = 0];
y1[t_] := y[t, 2];
Plot[y1[t], {t, 0, 20}, PlotRange -> {0, 2},
Epilog -> {PointSize[0.02], Red, Point[{s, y1[s]}]}],
{{s, 0, "GO"}, 0, 20, .01, ControlType -> Trigger, AnimationRate -> 4,
SaveDefinitions -> True},
Initialization -> (y[t_, x0_] := 1/(1 + (1/x0 - 1) Exp[-0.2 t]))
]
Answer
This works fine with me:
Manipulate[
If[s == 20, s = 0];
y1[x_] := y[x, 2];
y[x_, x0_] := 1/(1 + (1/x0 - 1) Exp[-0.2 x]);
Plot[y1[t], {t, 0, 20}, PlotRange -> {0, 2},
Epilog -> {PointSize[0.02], Red, Point[{s, y1[s]}]}],
{{s, 0, "GO"}, 0, 20, .01, ControlType -> Trigger, AnimationRate -> 4},
SaveDefinitions -> True,
TrackedSymbols :> {s}
]
To try it, copy my code (you had some typos in yours). TrackedSymbols (if used in the right way) kills the blinking.
Comments
Post a Comment