File Exchange

image thumbnail

Drift Diffusion Process

version 1.0 (2.39 KB) by

Simulating the drift diffusion process (variability across trial)

3 Ratings



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

Valerio Biscione

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.


Jing (view profile)

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
MATLAB 8.4 (R2014b)

Inspired: Quantile Probability Plot

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video