[FieldTrip] interpolation of bad channels matlab error

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Apr 17 13:53:54 CEST 2015


Hi Eva,
The MATLAB error suggests that your data is represented as single precision floating point numbers, and matrix multiplication is apparently not supported when you want to multiply with a sparse matrix.
You could try and convert your data to double precision: data=ft_struct2double(data); and then call ft_channelrepair.


Best,
Jan-Mathijs


On Apr 17, 2015, at 1:35 PM, Zita Eva Patai <eva.patai at psych.ox.ac.uk<mailto:eva.patai at psych.ox.ac.uk>> wrote:

Dear FTers

I have been trying to fix some bad channels in my data through interpolation.
It  seems to not be working. My code is below.
Please note my data object is converted from SPM (in case that matters).

Thanks very much in advance,
zita

data =

      fsample: 250
        label: {324x1 cell}
        trial: {1x505 cell}
         time: {1x505 cell}
         grad: [1x1 struct]
    triallist: {1x505 cell}

>> cfg2

cfg2 =

    badchannel: {2x1 cell}
        method: 'nearest'
    neighbours: [1x306 struct]

>> [interp]=ft_channelrepair(cfg2,data)
the input is raw data with 324 channels and 505 trials
using gradiometers specified in the data
repairing channel MEG1132
    using neighbour repairing channel MEG1421
    using neighbour
repairing bad channels for 505 trials .Error using  *
MTIMES is not supported for one sparse input and one single input.

Error in ft_channelrepair (line 172)
      interp.trial{i} = repair * data.trial{i};

--
Eva Zita Patai, DPhil
Postdoctoral Researcher
Oxford Centre for Human Brain Activity
University of Oxford
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150417/4f8b31c6/attachment-0002.html>


More information about the fieldtrip mailing list