Make video of (Markovian) density transition

Suppose one has managed to numerically compute the forward transition density of 2-dimensional Markov process under some finite difference algorithm (or finite elements). Of course at each time slice, there is going to be a surface of data. How about plotting its evolution?

Leveraging Fast Fourier Transform magic (here), after having converted each matrix of data into an image, suppose called test_%d.jpg, simply:

ffmpeg -start_number n -i test_%d.jpg -vcodec mpeg4 transDensity.avi

Like this:

Code converted with http://hilite.me/



Categories: Computing

Leave a comment