<div dir="ltr">Hi Maxime,<div><br></div><div>I wouldn't know why this would occur if everything else is the same, except that perhaps your current MATLAB in combination with your OS uses slightly different implementations of filter functions from e.g. another toolbox/other MATLAB versions.</div><div><br></div><div>In any case, as the function suggests, these problems typically occur for me when the low-pass frequency that is requested is too low for what the data and filter allows. The artefact detection functions probably uses a low/bandpass filter so try increasing the low cutoff, changing the filter order, or the filter type. You might also try using longer trial-lengths.</div><div><br></div><div>cheers,</div><div>Stephen</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 July 2018 at 09:57, maxime ferez <span dir="ltr"><<a href="mailto:maxime.ferez@gmail.com" target="_blank">maxime.ferez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">



















<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>Dear all,<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>I have a question about Fieldtrip
artifact-rejection. I find myself having a problem that I do not know how to
solve. I am currently working on a pc a little old (~ 5 years) and my analyzes
worked properly, or at least I had no bug. When I changed my pc the problem has
arrived. I have an error message "Calculated filter coefficients have
poles on or outside the unit circle and will not be stable. Try a higher cutoff
frequency or a different type/order of filter" that appears in the "filter_with_correction"
function .The problem seems to occur during the "roots" function of
Matlab. I verified and the vector that is introduced is exactly the same in
both cases, but </span><span lang="EN">after the
function “roots” runs the result differs slightly and induces the error message
above</span><span>. Has anyone ever had this
problem or know where the problem might come from? On both pcs I have exactly
the same versions of Matlab (R2017a) and fieldtrip (fieldtrip-20171004 and fieldtrip-20180626).
Scripts and data are also identical in all cases. I have tried several
configurations but failed to find the solution:<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Ubuntu 16.04 machine
about 5 years -> OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Ubuntu 16.04 machine
about 2 years -> Not OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>The two machines above are identical in all
softwares (deployed with script in PXE)<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Fedora 27 machine
about 2 years -> Not OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Ubuntu 16.04 about 2
years -> Not OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Fedora 17 about 8
years old -> OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>    - Centos7 machine less
than a year -> Not OK<span></span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>To conclude, the script only works on old
hardware but this does not seem logical as an explanation.<span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:"Calibri","sans-serif""><span>Best regards,<span class="HOEnZb"><font color="#888888"><span></span></font></span></span></p><span class="HOEnZb"><font color="#888888">

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:"Calibri","sans-serif""><span><span> </span></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:normal;margin:0cm 0cm 10pt;font-size:11pt;font-family:"Calibri","sans-serif""><span>Maxime Ferez<span></span></span></p>





<br clear="all"><br>-- <br><div class="m_-736550709372745585gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div>Maxime Ferez, ingénieur d'étude<br></div>Centre de Recherche en Neuroscience de Lyon (CRNL)<br></div>Inserm<br></div>équipe Dycog<br></div>Bron, France<br></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/<wbr>journal.pcbi.1002202</a><br></blockquote></div><br></div>