cutblockOnset.m 294 B

1234567
  1. %% Function: cut data into blocks, based on onset-triggers
  2. function [blocks] = cutblockOnset(data,trigs,blocklen,nBlck)
  3. blocks = zeros(blocklen,nBlck);
  4. for b = 1:nBlck
  5. blocks(:,b) = data(trigs(b):trigs(b)+blocklen-1); % cut block b, starting at trigger b with length of one block
  6. end