There are several resources to get help using CANlab object-oriented tools.
Walkthroughs and tutorials
This includes pages on the object types and philosophy.
There are two sets of Matlab tutorials:
“Walkthroughs” is designed as a set of “how-to” documents for the tools, with examples and code.
“Tutorials” are more didactic and include more conceptual description, along with data and code. This also has a section on the SPM GUI and running statistical models with SPM.
Batch scripts: Modular example code
The "second-level batch scripts" run flexible pipelines for doing many things with CANlab object-oriented tools once you have a set of image files to work with (typically one image per task condition per participant). They also produce published reports.
These scripts illustrate commands and processes that can be used with image data at other levels of analysis, too. If you find output (figures, tables, etc.) that you want to know how to create, you can read the code to see how it's done.
Additional CANlab examples and tutorials
The code that generates the walkthroughs and tutorials on canlab.github.io, and the "second-level batch" code, is in a Github repository, here:
It contains some "in progress" walkthroughs as well. We hope that people will be interested in contributing to and improving these!
Interactive help within Matlab
Much of the help available is embedded in the Matlab functions and object class definition files.
The info here is available by typing commands in Matlab:
doc <object class name>
There are a few object types (or "classes") that organize most of the things you can do with image data. Each class has methods associated with it, which are things you can run. You can list these methods using doc (see above) or using the "methods" command:
Then you can get help on any method by typing help <object class>.<method name>. For example:
Or, if there are not multiple "apply_mask" functions on your path, just:
Some older resources may also be helpful, and are here:
CANlab Core readthedocs
A "read" of the help included with Canlab Matlab functions. This describes the basic object types and methods, but has not been updated in several years.
Or, for a PDF version:
The info here is available by typing commands in Matlab (see above):
doc <object class name>
CANlab Repos Guide
This is a quite detailed document with information on:
- research computing (platform-specific but may be generally useful)
- data checking and visualization
- first-level models
- second-level models
- predictive models
- data acquisition considerations
- integrating physiology
CANlab Toolbox-specific help
Toolboxes like the Mediation toolbox, Robust regression toolbox, and meta-analysis toolbox have their own help files as well. Increasingly, help is integrated into the Walkthroughs and Tutorials discussed above, but check out the Readme files in these Github repositories and documentation in the toolbox folders as well.
The CANlab Github site contains many study-specific repositories, and many these are publicly available. Generally, they contain code and data that can be reused to generate new scripts and pipelines. You can search them here:
Resources for CANlab members: Data, templates, devices, more!
For those with access to restricted files, CANlab has a private repository that contains a lot of useful information. We are happy to share most of this on request, but believe it is more useful for the lab specifically than for general public use.
- Datasets: Behavioral datasets from some unpublished and published studies
- Equipment_and_devices: Descriptions and information about devices we use, including thermal/pressure/etc. noxious stimulators
- Redcap: Data and forms backing up some Redcap datasets
- Lab_protocols_and_procedures: A Project template including slides and folders, manuscript template, info on datalad, high-performance computing, pain calibration, IRB, file handling, and more.
- Paper_and_grant_templates: Templates for posters, presentations, writing
- Resources_and_information: Misc info on MRI acquisition, chronic pain, Matlab programming (including beginners' guide), R, statistics, writing. Includes archival copy of CANlab Repos Guide!
- Web_applications: Code for online mediation and NPS calculations on web
- Questionnaires: Survey instruments and scoring
Help with Matlab in general
This is not a comprehensive introduction to Matlab. It’s assumed that you will use other resources to supplement your basic understanding how to work with Matlab, including some linked here: https://canlab.github.io/tutorials/