Mind Reading: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Determine Targets == | == Determine Targets == | ||
=== Classifying Blocks === | === Classifying Task vs Baseline Blocks === | ||
If the goal is simply to distinguish task block from rest periods, use <code>findBlockBoundaries</code> as follows: | |||
b=bookends{ | b=bookends{1}; %creating targets for first run, so use first set of bookends | ||
s=zeros(1,b(end)); %1 zero for each volume -- default=baseline | s=zeros(1,b(end)); %1 zero for each volume -- default=baseline | ||
for block=1:size(b,1) | for block=1:size(b,1) | ||
s(b(block,1):b(block,2))=1; %block volumes get a '1' | s(b(block,1):b(block,2))=1; %block volumes get a '1' | ||
end | end | ||
=== Classifying Task Blocks === | |||
If blocks are associated with different tasks to be classified, the schedule vector, '''''s''''' can be created similarly, but with some modification. Here's some examples. | |||
TR=2.047; %the fMRI TR is 2.047 seconds in this example | |||
t=cell2mat({expinfo.data.timestamp}); | |||
t=t/TR; %convert the timestamps into volume numbers | |||
cond=double(cell2mat({expinfo.data.conditon})); %what condition is each trial? | |||
%p.s., note the typo on "cond'''iton'''" | |||
b=double(cell2mat({expinfo.data.block})); %what block is each trial? |
Revision as of 15:47, 11 July 2016
Determine Targets
Classifying Task vs Baseline Blocks
If the goal is simply to distinguish task block from rest periods, use findBlockBoundaries
as follows:
b=bookends{1}; %creating targets for first run, so use first set of bookends s=zeros(1,b(end)); %1 zero for each volume -- default=baseline for block=1:size(b,1) s(b(block,1):b(block,2))=1; %block volumes get a '1' end
Classifying Task Blocks
If blocks are associated with different tasks to be classified, the schedule vector, s can be created similarly, but with some modification. Here's some examples.
TR=2.047; %the fMRI TR is 2.047 seconds in this example t=cell2mat({expinfo.data.timestamp}); t=t/TR; %convert the timestamps into volume numbers cond=double(cell2mat({expinfo.data.conditon})); %what condition is each trial? %p.s., note the typo on "conditon" b=double(cell2mat({expinfo.data.block})); %what block is each trial?