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:
dt - time step
D - diffusion coefficient
dx - step of point
Maxim Vedenyov (2021). 2d diffusion simulation, GUI (https://www.mathworks.com/matlabcentral/fileexchange/34103-2d-diffusion-simulation-gui), MATLAB Central File Exchange. Retrieved .
Great program. I modified the code to allow showing the tracks of two particles: https://www.mathworks.com/matlabcentral/fileexchange/67581-2d-diffusion-simulator-with-particle-track-option
Is there a guide for the code?
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!