MATLAB for Neuroscience

Neuroscientists use MATLAB® and Simulink® to process and analyze experimental data, drive experiments, and simulate models of brain circuits. With MATLAB and Simulink, you can:

  • Analyze neural time-series data from electrode signal recordings
  • Understand structural and functional image data from neuroimaging and microscopy studies
  • Use machine and deep learning to classify, predict, and cluster using models trained with neuroscience data
  • Process and generate live data streams, including brain-computer interface (BCI) and behavioral control systems

Neuroscientists using MATLAB can also access a rich library of third-party tools purpose-built for neuroscience applications. These include freely-shared community toolboxes and commercially-supported partner products offering hardware and cloud connectivity.

“MATLAB is... a way of thinking, a language that cuts across countries, and a way of sharing and collaborating with other scientists…”

Mike X. Cohen, "MATLAB for Brain and Cognitive Scientists"

Neural Data Science

Use MATLAB to work with datasets containing multiple trials, subjects, and data modalities, using built-in libraries of algorithms for statistics, machine learning, and deep learning.

Use MATLAB to create neuroscience data stories with the Live Editor. Share these data stories and make them interactive for collaborators and readers as live scripts.
Scale MATLAB processing to run on all cores and GPU cards on individual computers and workstations using Parallel Computing Toolbox™. Access MATLAB Parallel Server™ to easily scale to remote clusters across one or more compute nodes.

Graph showing the brain health of senior patients is improved if they report high levels of mid-life social activity

Accelerating the analysis of neuroimaging data to study healthy cognitive aging (Cambridge University).


Multiple channels of signal data corresponding to EEG recordings obtained from an epileptic subject, during normal and pre-seizure periods.

Labeled intracranial EEG recordings from epileptic subject. (source: Kaggle) 

Neural Time Series

Use MATLAB to visualize and analyze neuroscience time-series data, including spike, field, and scalp recordings and behavioral monitoring records.

Apply preprocessing and extract data features in the time, frequency, and time-frequency domains using MATLAB algorithms and interactive apps for signal processing and wavelet analysis.

Apply deep learning techniques suited for time-series data, such as long short-term memory (LSTM) networks.


Neuroimaging and Microscopy

Use MATLAB to visualize and analyze neuroscience image and video data at the neuron, brain, and subject scales.

Access 2-D and 3-D image data in common file formats, such as NIfTI and TIFF, and work with datasets too large to fit in memory. Align images across imaging sessions and subjects. Analyze brain regions and cellular structures with morphological operations and algorithms for image segmentation. Build custom image processing workflows using interactive tools for specifying points and regions-of-interest (ROIs).

Interactively label image data with the Image Labeler and Video Labeler apps. Apply deep learning techniques to labeled datasets to classify or quantify whole images, identifiable regions or structures, or individual pixels.

Neurons in Brains with Alzheimer’s Disease

Evaluating Alzheimer’s Disease Therapeutic Targets with Deep Learning (Genentech)


A non-invasive brain-computer interface (BCI). Image credit: Carnegie Mellon University

Image credit: Carnegie Mellon University

Experiment Control and Brain-Computer Interfaces (BCIs)

Use MATLAB to stream data to and from a wide range of hardware devices, including data acquisition systems, cameras, EEG systems, neural recording systems, brain stimulators, and two-photon microscopes.

Use Simulink Real-Time™ and HDL Coder™ to control real-time hardware and FPGA hardware, respectively, to control experiments or BCIs with guaranteed submillisecond precision.

Use Stateflow® to design control logic for behavioral tasks, BCI systems, and other experiments. Run Stateflow charts in MATLAB, or target execution on real-time or FPGA hardware.


Topics for Neuroscience

Getting Started

Explore videos, examples, and tutorials to get up and running quickly.

Tools for Neuroscience

Community toolboxes and third-party products for neuroscience.