<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:102847678;
        mso-list-type:hybrid;
        mso-list-template-ids:-67335302 135462929 135462937 135462939 135462927 135462937 135462939 135462927 135462937 135462939;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL-BE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear Fieldtrip community, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I have recently started with Fieldtrip for my EEG data processing and I am encountering some problems which I can’t seem to resolve.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m working with mff files from an EGI EEG system. I have no problem reading in and preprocessing the data. However, when trying to downsample and setup the automatic artifact removal, I’m getting some errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">     
</span></span></span><![endif]><span lang="EN-US">When trying to downsample with the default options, these are the errors that I get:
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">Error using resample>getSamples (line 357)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">The number of elements of Tx must match the number of rows of X when X is a matrix<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">Error in resample>nonUniformResample (line 123)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">[x, tx] = getSamples(varargin{1:2});<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">Error in resample (line 116)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">  [varargout{1:max(1,nargout)}] = nonUniformResample(method,varargin{:});<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">Error in ft_resampledata (line 228)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red">        newdat = transpose(resample(transpose(olddat),fsres,fsorig));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.2pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:red">                </span>
<span lang="EN-US">I have tried downsampling before filtering, after filtering, on continuous data, or already segmented data. None of these things seem to resolve the error.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">     
</span></span></span><![endif]><span lang="EN-US">When trying to set up the automatic artifact removal process and choosing yes for the interactive plot, I get a plotting error:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Error using plot<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Vectors must be the same length.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Error in ft_artifact_zvalue>redraw_cb (line 973)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">    plot(opt.h1, xval, yval, 'linestyle', '-', 'color', 'b', 'displayname', 'data');<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Error in ft_artifact_zvalue (line 512)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">  redraw_cb(h);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">                <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:18.0pt"><span lang="EN-US">        I’ve noticed that the xval and yval are different numbers, which of course doesn’t allow plotting. It seems like the xval changes according to the epoch length, however the yval remains
 the same and equals the amount of samples in my continuous data.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:18.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">     
</span></span></span><![endif]><span lang="EN-US">When choosing no for the interactive plot, I also get an error:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Error using zeros<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Size inputs must be integers.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="color:red"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">Error in ft_artifact_zvalue (line 568)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="color:red">dum = zeros(1,max(opt.trl(:,2)));</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">                <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’ve been looking into the functions and where it goes wrong, but I can’t seem to pinpoint what exactly is causing these issues. Anyone here that can help or provide me some tips?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#1D8DB0">Gaëlle Leys<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#333333">Research Associate
<br>
Brain & Cognition <br>
Tiensestraat 102 box 3714 <br>
3000 Leuven<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#333333">Room PSI 02.33<br>
tel. </span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;background:white">+32 16 37 61 98</span><span style="font-family:"Arial",sans-serif;background:white"> </span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>