A quick intro to Matlab

Matlab is a powerful numerical computing program used widely throughout science and engineering. Here, we provide a very quick overview of the main features of Matlab relevant to TESA. For beginners wanting to learn more, search online for beginner Matlab tutorials.

An overview of Matlab. Note the position of these windows can vary between different Matlab layouts.

Command window

Instructions (commands) for Matlab are entered in to the command window. To launch the EEGLAB user interface, type eeglab in to the command line and press enter. TESA functions can also be run directly from the command line.

Current folder

The current folder is where Matlab looks for files and saves files. If a file/folder has not been added to the Matlab path (see 'set path' below) or is not in the current folder, Matlab will not be able to open it.

Editor

Instead of individually entering commands at the command line, multiple commands can be collated and run together as a script using the editor. This is an excellent approach for automating analysis pipelines.

Workspace

The workspace stores all of the data which Matlab uses to operate, including the EEG data used by EEGLAB. Once the EEGLAB user interface is launched and data is loaded in to EEGLAB, this can be accessed through the EEG structure in the workspace.

Set path

Before launching EEGLAB at the command line, the folder containing EEGLAB (and TESA in the plugins folder) must be added to the Matlab path using Set Path. Once the folder has been added, save the path so Matlab stores this information when the program is closed. This way the path only needs to be added once.

Last updated