[FieldTrip] channelcmb with removed channels

Allison Connolly ting.ac at gmail.com
Wed May 11 19:30:14 CEST 2011

I am trying to do beamforming on some MEG data. However, some of the sensors
railed during the recordings, so I want to remove them from the analysis. I
declare the channels I want to use during import with ft_preprocessing by
cfg.channel                 = {'MEG','-TRIGGER','-RESPONSE',...

Then I use ft_freqanalysis to calculate the cross spectral density and
ft_prepare_leadfield to create the brain grid. When I try to run
ft_sourceanalysis, I get this error:
creating dipole grid based on user specified dipole positions
13718 dipoles inside, 144943 dipoles outside brain
???  In an assignment  A(I) = B, a matrix A cannot be resized.

Error in ==> prepare_freq_matrices at 115
    Cf(find(crsspctrmindx)) =
freq.crsspctrm(crsspctrmindx(find(crsspctrmindx)), fbin);

Error in ==> ft_sourceanalysis at 461
    [Cf, Cr, Pr, Ntrials, cfg] = prepare_freq_matrices(cfg, data);

I think it is because I have removed channels. When I try to run
ft_freqanalysis while specifying the channels in cfg.channel, i get this
the input is raw data with 111 channels and 60 trials
??? Error using ==> ft_freqanalysis at 352
*channels in cfg.channelcmb not present in cfg.channel*
*I think I need to explicitly define cfg.channelcmb, but I don't know how to
do this if I have removed channels.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110511/dc1718f1/attachment-0001.html>

More information about the fieldtrip mailing list