<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Eva,
<div>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.</div>
<div>You could try and convert your data to double precision: data=ft_struct2double(data); and then call ft_channelrepair.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
<div>
<div>On Apr 17, 2015, at 1:35 PM, Zita Eva Patai <<a href="mailto:eva.patai@psych.ox.ac.uk">eva.patai@psych.ox.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">
<div style="font-size:12.8000001907349px">
<div>
<div>
<div>
<div>
<div>Dear FTers<br>
<br>
</div>
I have been trying to fix some bad channels in my data through interpolation.<br>
</div>
It  seems to not be working. My code is below.<br>
</div>
Please note my data object is converted from SPM (in case that matters).<br>
<br>
</div>
Thanks very much in advance,<br>
</div>
zita<br>
<br>
</div>
<span style="font-size:12.8000001907349px">data = </span><br style="font-size:12.8000001907349px">
<br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">      fsample: 250</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">        label: {324x1 cell}</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">        trial: {1x505 cell}</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">         time: {1x505 cell}</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">         grad: [1x1 struct]</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">    triallist: {1x505 cell}</span><br style="font-size:12.8000001907349px">
<br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">>> cfg2</span><br style="font-size:12.8000001907349px">
<br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">cfg2 = </span><br style="font-size:12.8000001907349px">
<br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">    badchannel: {2x1 cell}</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">        method: 'nearest'</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">    neighbours: [1x306 struct]</span><br style="font-size:12.8000001907349px">
<br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">>> [interp]=ft_channelrepair(</span><span style="font-size:12.8000001907349px">cfg2,data)</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">the input is raw data with 324 channels and 505 trials</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">using gradiometers specified in the data</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">repairing channel MEG1132</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">    using neighbour repairing channel MEG1421</span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">    using neighbour </span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">repairing bad channels for 505 trials .</span><span style="font-size:12.8000001907349px;color:rgb(255,0,0)">Error using  * </span><br style="font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px;color:rgb(255,0,0)">MTIMES is not supported for one sparse input and one single input.<br>
<br>
Error in ft_channelrepair (line 172)<br>
      interp.trial{i} = repair * data.trial{i};</span><br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>Eva Zita Patai, DPhil</div>
<div>Postdoctoral Researcher</div>
<div>Oxford Centre for Human Brain Activity</div>
<div>University of Oxford</div>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote>
</div>
<br>
</div>
</body>
</html>