Diff for "VisualiseRegressors" - MRC CBU Imaging Wiki
location: Diff for "VisualiseRegressors"
Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2011-08-16 13:29:05
Size: 1318
Comment:
Revision 5 as of 2013-03-07 21:23:59
Size: 1251
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
1. Load SPM Design:  a) Drag and drop the SPM.mat file into your command line.  b) type: <load('/imaging/you01/yourfilesaddress/SPM.mat')> 2. Save the regressor information:  in the command window, type: <desmat = SPM.xX.X> 3. Display your regressor  in the command window, type: <figure; plot(desmat(:,1))> * the 1 corresponds to the first regressor in your DM. To view the second regressor change this to a two and so on... Voila! }}} 1. Load SPM Design:
a) Drag and drop the SPM.mat file into your command line.
b) type: <load('/imaging/you01/yourfilesaddress/SPM.mat')>
2. Save the regressor information:
in the command window, type: <desmat = SPM.xX.X>
3. Display your regressor:
in the command window, type: <figure; plot(desmat(:,1))>
 
* the 1 corresponds to the first regressor in your DM. To view the second
  
regressor change this to a two and so on... Voila! }}}
Line 23: Line 31:
attachment:C%3A%5CDocuments and Settings\bc01\Desktop\Regressor Screen Shot.jpg

How to Visualize Regressors

Hopefully this example piece of script should allow you to visualize your block or event regressors individually so as to check that everything is bein modelled the way it should be.

It's a simple three step process:

1. Load your SPM design after having run your first level analysis

2. Save the regressor information within the SPM.mat file to another variable

3. Create a figure and plot your regressor of interest.

Example

1. Load SPM Design:
   a) Drag and drop the SPM.mat file into your command line.
   b) type: <load('/imaging/you01/yourfilesaddress/SPM.mat')>
2. Save the regressor information:
   in the command window, type: <desmat = SPM.xX.X>
3. Display your regressor:
   in the command window, type: <figure; plot(desmat(:,1))>
   * the 1 corresponds to the first regressor in your DM. To view the second
   regressor change this to a two and so on... Voila! 

Display

CbuImaging: VisualiseRegressors (last edited 2013-03-07 21:23:59 by localhost)