File Exchange

image thumbnail

Drift Diffusion Process

version (2.39 KB) by Valerio Biscione
Simulating the drift diffusion process (variability across trial)


Updated 18 Dec 2014

View License

This is a optimized simulation of the drift diffusion process (DDP, as described, for example, here I used a mixture of for loops and cumsum to obtain high speed.
The same code can be used to have a diffusion process without drift across trial, a binary DDP, a one-choice DDP, a one choice pure diffusion process.

Comments and Ratings (4)

Arthur Knol

Hause Lin

Hi Jing, fitting the drift diffusion model could be quite tricky. You could use the DMAT toolbox designed exactly for that purpose. Alternatively I have some methods that I use myself. I will maybe post them on here in the future, if I can manage to clean the code up a little bit.


I'm so happy to find this code! Would you please tell how to fit the model to specific data, is there existing code or functions?

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Quantile Probability Plot