Skip to main content
Social Sci LibreTexts

11.2: Expected Background Knowledge

  • Page ID
    87989
  • \( \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}}\)

    This chapter is designed for individuals all levels of prior experience, including people who have very little programming experience, people with substantial experience in other languages but little or no Matlab programming experience, and people who already know how to program in Matlab and just want to learn how to use EEGLAB and ERPLAB routines. I’m not actually a very experienced Matlab programmer myself, but I have a lot of experience with other languages.

    Learning how to write scripts may seem daunting if you’ve never done any serious computer programming before. Fortunately, EEGLAB and ERPLAB have a history feature that make it fairly easy to write simple scripts for automating your analyses. Every time you run a routine from the GUI, the equivalent script command is saved in the history. To begin writing a script, you simply go through all the steps in the GUI, and then copy the commands from the history into a script file. You’ll usually need to make a few minor modifications to the commands, and then you need to add a little bit of general Matlab code so that your script can automatically loop through all your participants. But that’s the essence of creating automated EEGLAB/ERPLAB scripts. In fact, that’s exactly the process I used to create the example scripts for this book.

    The scripts you’ll write to automate your EEGLAB/ERPLAB analyses will be pretty simple, but you do need to understand some basic programming concepts, especially variables, arrays, and loops. I’m not going to explain these concepts, so you will need to do a little preparation before starting this chapter. When someone without a lot of programming experience joins my lab, I typically have them take the online Introduction to Programming with MATLAB course offered on Coursera. Then, I have them work through a great book called Matlab for Behavioral Scientists (Rosenbaum et al., 2014). If you already have a lot of experience with other programming languages, but you haven’t programmed in Matlab, I recommend getting any of the books that provide a general introduction to Matlab so you can learn its specific syntax and its unusual but powerful approach to matrix operations.


    This page titled 11.2: Expected Background Knowledge 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?