Mind Reading: Difference between revisions

From CCN Wiki
Jump to navigation Jump to search
(Created page with "== Determine Targets == === Classifying Blocks === Use <code>findBlockBoundaries</code> to determine when blocks start and end. For each run, create a vector of zeros with a l...")
 
Line 3: Line 3:
Use <code>findBlockBoundaries</code> to determine when blocks start and end. For each run, create a vector of zeros with a length equal to the endpoint of the last block:
Use <code>findBlockBoundaries</code> to determine when blocks start and end. For each run, create a vector of zeros with a length equal to the endpoint of the last block:
  b=bookends{1,1}; %creating targets for first run, so use first set of bookends
  b=bookends{1,1}; %creating targets for first run, so use first set of bookends
  s=zeros(1,b(end)); %creates a vector of zeros, 1 for each volume. Can be used to set a default target node of 0 for rest intervals
  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

Revision as of 15:25, 11 July 2016

Determine Targets

Classifying Blocks

Use findBlockBoundaries to determine when blocks start and end. For each run, create a vector of zeros with a length equal to the endpoint of the last block:

b=bookends{1,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