I am trying to export an Animate object to a GIF file, but the saved GIF file keeps flickering. How do I fix this?
X[t_, p_] = Table[{Sin[t + (k*\[Pi])/p]}, {k, 0, 8}];
Cr[t_, p_] =
FullSimplify[Integrate[X[s, p].Transpose[X[s, p]], {s, 0, t}]];
Eig2[t_, p_] := Eigenvectors[Cr[t, p]][[1]]
Export["cm.gif",
Animate[GraphicsGrid[{{MatrixPlot[Cr[2*\[Pi], u],
ImageSize -> {350, 350}], Plot[X[t, u], {t, 0, 2 \[Pi]}],
ListPlot[Eig2[2 \[Pi], u]]}}], {u, 0.01, 1, 0.01}]]
produces:
which is terrible!
Cr[t_, p_] := NIntegrate[X[s, p].Transpose[X[s, p]], {s, 0, t}];
instead. $\endgroup$u
. You can see the red error rectangle for the frames that fail. The right question isn't why the animation flickers, but why the code fails for someu
. $\endgroup$