Programming Basics

Introductory resources to learn programming

There are some very good free on-line tutorials out there to help you begin to learn the basics of pretty much any computer language.

Ticking off the boxes: Basic knowledge you should have

To go through the rest of the modules contained on this site, you should make sure you understand the following:

More advanced programming knowledge

None of the code presented in these pages requires the knowledge below. However, as you progress through coding skills, you may find these aspects of coding extremely helpful.

  • If you are working with large datasets or computationally intensive analyses (e.g. machine learning, modeling, etc.), learning how to use Matlab's distributed computing capabilities is a must. Otherwise, you could be looking at your first grey hairs before an analysis runs to completion (assuming you don't already have them!).

    • Understand the uses of the parpool/parfor combo for breaking up jobs with a huge number of loop-iterations. For example, our lab uses this functionality to reduce the time taken to estimate complex computational models.

    • Understand how to run multiple instances of a function simultaneously and in parallel using the createJob/createTask combo. This can be useful if you've written a script/function that runs once per subject, but takes a long time to finish all the calculations for that subject. We often use functionality like this to process subjects through a neuroimaging pipeline in parallel, or to estimate parameters of a computational model on a per-subject basis.

return to main page