Courses‎ > ‎

Matlab Bootcamp

Course Information:

Matlab is a powerful, high level scripting language. You can use it for practically anything. OK, maybe not literally anything, but it's still very useful at at that. Add-on toolboxes extend the already powerful package to allow you to do things like run behavioral/fMRI/EEG experiments (PsychToolbox), analyze fMRI data (SPM), analyze ERP/EEG data (EEGlab, ERPlab, ERP PCA toolbox). Basically, anything we want to do in the Memory and Cognition lab, we could do with Matlab. 

In my opinion, the best way to learn to use Matlab (or any other programming language) is to use it to solve a problem. The problem that we'll address in this course is implementing an fMRI experiment. We'll take it from the start by first writing a program to display the stimuli and collect responses that interfaces with the MRI scanner. We'll then simulate data based on your program's output and finally analyze the data using custom scripts.

Textbook: For this course, we'll use Mastering Matlab 7 by Hanselman and Littlefield. We'll also use a number of online resources linked at the bottom of this page. 

Obtaining Matlab: Graduate students should be able to download a copy of Matlab from BYU by logging in at The bookstore has copies of the student version of Matlab for $99 (cheap when you consider the regular license is $500). 

 WeekTopic Reading Assignment
 1Intro, getting around Ch 1-3  Watch Navigating the Matlab Desktop
 2 Variables, arraysCh 5, 7  Watch Matlab Fundamentals
 3 Graphics, plottingCh 26  Watch Visualizing Data
 4 Data in/out, planning a programCh 10  
 5 Flow and loopsCh 11 Watch Flow and Loop Control
 6 Scripting, functions    Ch 12  Watch Writing Functions
 7 Psychtoolbox  
 8 Psychtoolbox program design  
 9 DebuggingCh 13  Watch Programming Roadmap
 10 Data simulation  
 11 Data analysis: behavior  
 12 Data analysis: fMRI  
 14 Data analysis EEG   
 15 Class Party  


Files you'll find useful for programming project:

Brock Kirwan,
Apr 26, 2010, 10:40 PM
Brock Kirwan,
Mar 14, 2011, 2:56 PM
Brock Kirwan,
Mar 14, 2011, 12:59 PM
Brock Kirwan,
Mar 7, 2011, 3:17 PM