[FieldTrip] Problem matrix dim in ft_timelockanalysis

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Oct 27 15:44:56 CET 2015

Hi Mats,
Based on your description I suspect an issue with floating point numerical round off. I would assume that the length of your trials is fixed and the time axis supposed to be equal across trials?
Could you try and do data.time(1:end) = data.time(1); and report back whether the problem persists (or vanishes)?

On Oct 27, 2015, at 3:29 PM, Es, M.W.J. van (Mats) <M.vanEs at donders.ru.nl<mailto:M.vanEs at donders.ru.nl>> wrote:

Hi FieldTrippers,

I want to apply a support vector machine (SVM) on small timewindows of my data, which means I loop ft_timelockanalysis and ft_timelockstatistics over time. However, for some timepoint I get the following error:
Index exceeds matrix dimensions.

Error in ft_timelockanalysis (line 278)
    s (:,windowsel) = s (:,windowsel) + dat;            % compute the sum

I tried to look into the error, and I saw that for some timewindows 'windowsel' and 'dat' are a 1x4 vector, whereas 's' is a 1x3 vector. I couldn't find why this mismatch occurs so any help is appreciated.
I also tried older versions of this function and I got the same error. I am using the latest fieldtrip on matlab2015a on the cluster.

Mats van Es
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>

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

More information about the fieldtrip mailing list