learningMatlab

Introduction & Overview

In the first two units, we’ll be going over some Matlab basics:

Materials

You can refer to a short matlab primer that will walk you through some of the basics.

Exercises

To make sure you are ready for the mini-project related to the neuroimaging analysis, I suggest you walk through the following sets of exercises on the Matlab command prompt. It’s important that you think about what should be happening before you hit the return key to execute the code. You could even put all the lines into a file in the Matlab editor window and write comments to go along:

  1. Doing basic maths on the command prompt
  2. Simple commands for getting the mean, std, etc.
  3. More simple commands and some practice making vectors and matrices that contain specific things.
  4. Scripts and functions - why they are useful, how they work.
  5. Plotting data - making simple plots.
  6. Loops, if/else, controlling flow - making simple plots.
  7. Test your knowledge - understand an existing piece of code and fix it up (debug + refactor)
  8. Application: loop over multiple plots - plot a family of curves (with nice colors)
  9. Application: nested loops to construct filenames - make strings / text that follows a certain pattern.