Back to the main page.

Bug 893 - freqstatistics fails for fourier input data with a rpttap in the dimord

Status CLOSED FIXED
Reported 2011-08-24 14:43:00 +0200
Modified 2011-08-31 14:50:08 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Laura Marzetti - 2011-08-24 14:43:15 +0200

on line 239 % create the 'dat' matrix here dat = data.(cfg.parameter); siz = size(dat); dimtok = tokenize(data.dimord, '_'); rptdim = find(ismember(dimtok, {'rpt' 'subj'})); permutevec = [setdiff(1:numel(siz), rptdim) rptdim]; % permutation vector to put the repetition dimension as last dimension reshapevec = [prod(siz(permutevec(1:end-1))) siz(rptdim)]; % reshape vector to reshape into 2D dat = reshape(permute(dat, permutevec), reshapevec);% actually reshape the data this code fails for dimord=rpttap_chan_freq_time, causing rptdim to remain empty and the reshape to error. it should do if isempty(rptdim) error('cannot determine the dimension corresponding to the repetitions') end and of course rpttap should be added


Jan-Mathijs Schoffelen - 2011-08-29 15:38:24 +0200

Hi Laura, I fixed this. Could you download an up-to-date version of fieldtrip (available as of tonight) and check whether it now works?