Skip to main content
Social Sci LibreTexts

1.3: Exercise- Loading an EEG File

  • Page ID
    87926
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    We’re now going to start a quick tour of EEGLAB and ERPLAB. In the first exercise, you’ll look at the EEG data and the averaged ERPs from one subject in an N400 experiment that will be described in more detail in the next chapter. 

    If Matlab is not already running, launch it. If EEGLAB is already running, quit from EEGLAB and launch it again by typing eeglab in the Matlab command window. (It’s usually a good idea to quit and restart EEGLAB before starting an exercise. That way, EEGLAB will be in its default state, and what you see will better match the screenshots in this book.)

    Now download the Chapter 1 folder from the master folder at https://doi.org/10.18115/D50056. Note that an underscore is used instead of a space in the folder name. Spaces can sometimes confuse Matlab, so it’s best to use underscores or dashes instead of spaces in your folder names and file names. But don’t use any other non-alphanumeric characters. Set Chapter_1 to be Matlab’s current folder. The current folder is part of Matlab’s path, and it’s the first place Matlab will look for files and code. Screenshot 1.3 shows what it should look like once you’ve set the current folder. You’ll see the path to the folder and the contents of the folder.

    Screenshot 1.3

    nbCo2Or3onmvDVLRyOYbEMPn8QZMwxbnv_n5w3f2kR_msINj24xqE23bQ7BvujDwmtI_fKOglfIame0mFBeY3nBA4pHwV7ll9RQqwIohleswrGJMxFWDknPtFOs9VBfVxbIpWmU

    There are various ways of setting the current folder, including double-clicking on a folder name within the current folder. Play around with this a bit (Googling it if necessary using a search phrase such as “matlab current folder GUI”). You’ll be changing the current folder frequently, so you’ll want to know how to do it efficiently.

    Once you have the correct current folder, go to the EEGLAB window and select File > Load existing dataset. It will bring up a dialog box, which should show the contents of the Chapter_1 folder. Select and open the file named 1_N400_preprocessed.set. This file is called a dataset, which means that it contains the EEG data for one participant. You can see that it loaded correctly by looking in EEGLAB’s Datasets menu (see Screenshot 1.4).

    Screenshot 1.4

    9by9XoOb-c2x6SXq-eYO6YaLitJc-XtVU943Mq_L-01izGpzvpSTGLTfdy0GvhQTMjrxGTLELGBJUA7lIHdaS0FTbQKaH8badM3Tk0A_zD_uqqA_cvAtCQ3-tGDnIAtjkiiyLh8

    This page titled 1.3: Exercise- Loading an EEG File is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.

    • Was this article helpful?