# Plotting animations (time-evolution)

• MATLAB

## Main Question or Discussion Point

Hi all,

I have a spatial probability density function that is dependent on $x$, space and $t$, time.

I am able to make a plot for spatial probability density for each point in time by specifying $t$ values by using the fplot function.

However, I want an animation that allows me to see how probability density evolves from say $t[0 , 5]$.

Are there any MATLAB functions that could help me achieve this?

Many thanks in advance.

## Answers and Replies

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
DrClaude
Mentor
In the loop over time, simply plot the pdf at every step on the same plot. As the calculation goes, it will appear as an animation.

In the loop over time, simply plot the pdf at every step on the same plot. As the calculation goes, it will appear as an animation.
I believe I understand what you mean. I'll give it a shot, thank you!