I've the following code:
ManToGif[man_, name_String, step_Integer] :=
Export[name <> ".gif",
Import[Export[FileNameJoin[{NotebookDirectory[], "hoi2.avi"}],
man], "ImageList"][[1 ;; -1 ;; step]]];
hoi2 = Manipulate[Ud = x; Uin = 5; Rb = 10; c = 150*10^(-6);
y[fin_] =
2*fin*(2*T*Ud - ((Ud)/(fin)) + ((Uin*Sin[2*Pi*fin*T])/(2*Pi*fin)) +
c*Rb*(2*Ud - Uin)*(Exp[-((T)/(c*Rb))] - 1));
Teqn[fin_] =
Abs[Uin*Sin[2*Pi*fin*T - (Pi/2)]] - 2*Ud == (Uin - 2*Ud)*
Exp[-T/(c*Rb)];
Tsol[fin_?NumericQ] :=
FindRoot[Teqn[fin], {T, 1/(4*fin), 1/(2*fin)}];
Show[ListPlot[
Table[{fin, y[fin] /. Tsol[fin]}, {fin, 0.001, 1000, 0.01}]],
ListPlot[{{1000, 3.0214}, {500, 2.8021}, {250, 2.4941}, {125,
2.1516}, {62.5, 1.9251}, {0.01, 1.7622}},
PlotStyle -> Red]], {x, 0, 1}]; ManToGif[hoi2,
FileNameJoin[{NotebookDirectory[], "hoi2"}], 1];
It creates two files, a .avi file and a .gif file. When I open the .gif file I get a black screen (so nothing is shown). What is the reason for that behaviour? What do you get when you run this code?
Manipulateexpression is a piece of code, not a sequence of images.Exporthas no automatic conversion from that code to images. – m_goldberg Jun 20 '18 at 01:13Manipulateis smart enough to chunk itself and make a .gif file. Never made an AVI from one though – b3m2a1 Jun 20 '18 at 01:57Exportthat way. Thanks for putting me straight. – m_goldberg Jun 20 '18 at 02:22Animatoras part of its box structure can do that, too. – b3m2a1 Jun 20 '18 at 02:27ManToGifcode, it was written by Vitaliy Kaurov if I recall correctly. – C. E. Oct 02 '18 at 04:27