The following Matlab project contains the source code and Matlab examples used for 2d diffusion simulation, gui.
http://simulations.narod.ru/
The diffusion is simulated as set of points with random step each frame of time. Looks like brownian motion.
Step of point can be estimated from diffusion equation:
dn/dt=D*(d2n/dx2+d2n/dx2)
then approximately:
1/dt=D/dx^2
dx=sqrt(D*dt)
dt - time step
D - diffusion coefficient
dx - step of point

The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.

## Project Files:

File Name | Size |
---|---|

license.txt | 1314 |

run_me.fig | 6040 |

run_me.m | 7095 |