<div dir="ltr"><div class="gmail_default" style="font-size:small">Oops, seems I was too quick to ask for help. I traced the error to my trial definitions which were not specified as integer samples. That led to the "​Size inputs must be integers" error below.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Might it be an idea to place a check for integer values in cfg.trl when passed to ft_redefinetrial()?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">- Per</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 14, 2016 at 10:43 AM, Per Knutsen <span dir="ltr"><<a href="mailto:knutsenpm@gmail.com" target="_blank">knutsenpm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div style="font-size:small">Hi,</div><div style="font-size:small">My calls to ft_databrowser([], data) is failing with:</div><div style="font-size:small"><br></div><div style="font-size:small">>the input is raw data with 16 channels and 10 trials<br>>detected   0 visual artifacts<br>>Error using zeros<br>><div class="gmail_default" style="font-size:small;display:inline">​​</div>Size inputs must be integers.</div><div style="font-size:small">>Error in convert_event>artifact2artvec (line 179)<br>>artvec = zeros(length(artifact), endsample);</div><div style="font-size:small">>Error in convert_event (line 103)<br>>   obj = artifact2artvec(obj,endsample)<wbr>;</div><div style="font-size:small">>Error in ft_databrowser (line 535)<br>>artdata.trial{1}       = convert_event(artifact, 'boolvec', 'endsample', datendsample); % every >artifact is a "channel"<br> </div><div style="font-size:small">I am not certain if this is triggered by a lack of artifacts in my data, that my data structure is missing information, or that the code does not allow for "zero artifacts" by design.</div><div style="font-size:small"><br></div><div style="font-size:small">Here is my data structure:</div><div style="font-size:small"><br></div><div style="font-size:small">data = </div><div style="font-size:small">           hdr: [1x1 struct]<br>       fsample: 4800<br>    sampleinfo: [10x2 double]<br>         trial: {1x10 cell}<br>          time: {1x10 cell}<br>         label: {16x1 cell}<br>           cfg: [1x1 struct]</div><div style="font-size:small"><br></div><div style="font-size:small">My data is loaded through a custom reader as the data format I have is not supported natively by fieldtrip.</div><div style="font-size:small"><br></div><div style="font-size:small">I have succeeded in pre processing the data with ft_redefinetrial() and ft_preprocessing().</div><div style="font-size:small"><br></div><div style="font-size:small">Any ideas?</div><div style="font-size:small"><br clear="all"></div><div><div class="gmail-m_-1635926795573428451gmail_signature"><div dir="ltr"><div><div><div dir="ltr"><div><div><div dir="ltr"><div><b><br></b></div><div><b>Per M Knutsen</b></div><div><font size="1">University of Oslo</font></div><div><font size="1">Dept. of Molecular Medicine, Physiology Sect.</font></div><div><font size="1">PB 1103 Blindern, NO-0317 Oslo</font></div><div><font color="#1155cc" size="1"><a href="tel:%2B47.45103762" target="_blank" value="+4745103762">+47.45103762</a></font></div></div></div></div><div dir="ltr"><div style="font-size:small"></div></div></div></div></div><div dir="ltr"><div style="font-size:small"></div></div></div></div></div>
</div>
</blockquote></div><br></div></div>