File Exchange

image thumbnail


version 2.2 (1.37 MB) by Elliot Layden
The classic dual n-back task implemented in Matlab; includes position, sound, and color options.


Updated 18 Nov 2019

From GitHub

View Version History

View license on GitHub

This is an implementation of the dual n-back task for Matlab, similar to Brain Workshop ( Dual n-back is widely used as a cognitive psychology task to measure and/or train working memory. This implementation offers many customization options and may be suitable for research, including within the MRI scanner. For instance, you can precisely control the number of lure or interference trials (i.e., n-back +/- 1). Lure trials require executive control to avoid indicating a match in error.

If you use the software in research or a commercial application, please cite it as:
Layden, E. A. (2018). N-Back for Matlab. G-Node Open Data. DOI:

Cite As

Layden, E. A. (2018). N-Back for Matlab. G-Node Open Data. DOI:

Comments and Ratings (1)

Matej Varga

Thank you. Nice and pioneering contribution of n-back in Matlab! It would be great if the app will be furtherly developed in the future (more modes, settings, etc.)

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!