I want to do a dynamic plot with synchronization of real time, that is, I have a function, f[t], that is a function of time (seconds), so I want to see the curve changing not so fast or not so slow, just in real time (seconds).
I tried this:
data = {};
t = 0;
freq = .5 Pi;
f[t] := Sin[freq t] + Sin[1.5 freq t];
Dynamic[
current=f[t];
AppendTo[data,current];
t = t + .05;
ListPlot[data, PlotRange->{{t-200, t}, {-5, 5}}, ImageSize->Medium],
UpdateInterval->0]
Issues:
- When I plot, the time is not synchronized, that is, it is too fast or too slow. How do I do it?
- As time goes on, the plot speed get slower. data vector is too big???
- How do I stop the "shacking" of the plot along time?
UpdateInterval->1, TrackedSymbols:>{}
an answer? 9766 $\endgroup$ – Kuba♦ Dec 27 '15 at 10:51Animate
$\endgroup$ – Sascha Dec 27 '15 at 10:56AppendTo
has terrible performance in Mathematica. $\endgroup$ – Sascha Dec 27 '15 at 11:03if possible, be done at least every t seconds
. This whole subject of "real time" and Mathematica dynamics is very tricky. $\endgroup$ – Nasser Dec 27 '15 at 11:33