[FieldTrip] missing sample after using ft_componentanalysis with method bsscca
Drijvers, L. (Linda)
l.drijvers at donders.ru.nl
Wed May 6 09:58:33 CEST 2020
Dear all,
I'm analysing an EEG dataset using MATLAB 2016a + FieldTrip version 20200409.
I am trying to use ft_componentanalysis with cfg.method = 'bsscca' (see code):
cfg = [];
cfg.channel = 1:length(data_Aclean.label)-2;
cfg.method = 'bsscca';
cfg.cellmode = 'yes';
comp_output = ft_componentanalysis(cfg, data_Aclean);
When I then try to use ft_databrowser with the following code:
cfg = [];
cfg.channel = [1:10];
cfg.viewmode = 'component';
cfg.layout = 'customlayout.mat';
ft_databrowser(cfg, comp_output);
I get the following error:
Index exceeds matrix dimensions.
Error in ft_fetch_data (line 199)
dat(:,ok) = data.trial{utrl}(chanindx,smps);
Error in ft_databrowser>redraw_cb (line 1630)
dat = ft_fetch_data(opt.orgdata, 'header', opt.hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx,
'allowoverlap', istrue(cfg.allowoverlap));
Error in ft_databrowser (line 729)
redraw_cb(h);
A closer look at the data shows that while fsample for my data is 500, smps is 499 after running ft_componentanalysis with method bsscca. However, I can solve the error above by running ft_databrowser with comp_output = rmfield(comp_output, 'sampleinfo').
My question is: what causes this discrepancy in smps (why does this one sample go missing)? Any help would be appreciated.
Best wishes,
Linda Drijvers
dr. Linda Drijvers | postdoctoral researcher | https://cosilab.org
Donders Institute for Brain, Cognition and Behaviour, Radboud University, NL
www.ru.nl/english/people/drijvers-l/ | https://www.mpi.nl/people/drijvers-linda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200506/5aeb6ea0/attachment.htm>
More information about the fieldtrip
mailing list