<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Mats,
<div>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?</div>
<div>Could you try and do data.time(1:end) = data.time(1); and report back whether the problem persists (or vanishes)?</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
<div>
<div>On Oct 27, 2015, at 3:29 PM, Es, M.W.J. van (Mats) <<a href="mailto:M.vanEs@donders.ru.nl">M.vanEs@donders.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div fpstyle="1" ocsi="0" style="font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">Hi FieldTrippers,
<div><br>
</div>
<div>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:</div>
<div>
<div><i>Index exceeds matrix dimensions.</i></div>
<div><i><br>
</i></div>
<div><i>Error in ft_timelockanalysis (line 278)</i></div>
<div><i>    s (:,windowsel) = s (:,windowsel) + dat;            % compute the sum</i></div>
</div>
<div><br>
</div>
<div>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.</div>
<div>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.</div>
<div><br>
</div>
<div>Best,</div>
<div>Mats van Es</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br>
</div>
</body>
</html>