<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Giuseppe, 
<div class=""><br class="">
</div>
<div class="">At first sight it looks as if something is not going right with the specified rotation of the electrode positions. Have you tried to set a breakpoint in the code and go through it step by step to see what is happening in detail? This should give
 you some more clues about what is not going entirely right. It’s hard from a distance to diagnose this.</div>
<div class=""><br class="">
</div>
<div class="">If you have difficulties in diagnosing it yourself, you may want to share some relevant data with us (at minimum your data.elec) so that an adventurous colleague - who is reading along - can have a go at it.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Aug 2022, at 18:51, Zito Giuseppe Angelo via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Dear Fieldtrip experts,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I have a problem with the EEG layout, which appears to be rotated by 90 degrees.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I import data from EEGlab (power spectra), and run the stats in fieldtrip (</span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_freqstatistics</span><span lang="EN-GB" style="font-size: 12pt; font-family: "Courier New";" class="">)</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I have my own layout with 118 electrodes, which I created with<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">.</span><span lang="EN-GB" style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">While calling<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_clusterplot</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>or<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_topoplotER</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">,
 Matlab sends the following warning:</span><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif;" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 12pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">the input is freq data with 118 channels, 4 frequencybins and no timebins<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">creating layout from data.elec<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">creating layout for ext1020 system<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">Warning: use cfg.rotate to specify the correct rotation of the sensors<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class=""> In ft_prepare_layout>sens2lay at line 1300<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">In ft_prepare_layout at line 596<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">In ft_clusterplot at line 123<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">The resulting topoplot is indeed tilted (see picture attached).<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">I tried to add<span class="Apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">cfg.rotate = -90</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><span class="Apple-converted-space"> </span>and
 run again<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">,<span class="Apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">but
 the problem was unsolved.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Could you please help to solve this issue?<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">In case I have to modify the layout with<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: "Courier New";" class="">ft_prepare_layout</span><span lang="EN-GB" style="font-size: 10pt; font-family: "Courier New";" class="">,</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">could
 you please give me a sample code to fix that?<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Thank you very much,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">Giuseppe Zito</span><span lang="EN-GB" style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div class="">
<div class="">
<div class="">
<div class="MsoNormal" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="DE-CH" style="font-size: 10pt; font-family: Arial, sans-serif;" class="">
<hr size="2" width="100%" align="left" class="">
</span></div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<b class=""><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif;" class="">Dr. Giuseppe Angelo Zito</span></b><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif; color: rgb(34, 34, 34);" class=""><o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Principal Investigator, Swiss National Science Foundation<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""><o:p class=""> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Decision Neuroscience Lab<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Department of Health Sciences and Technology (D-HEST)<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">ETH – Swiss Federal Institute of Technology Zurich<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class=""><o:p class=""> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Winterthurerstrasse 190<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">8057 Zürich<o:p class=""></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 2.4pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;">
<span lang="FR-CH" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Switzerland<o:p class=""></o:p></span></p>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9.5pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">Tel: +41 44 633 05 17<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" style="font-size: 9.5pt; font-family: Arial, sans-serif; color: rgb(89, 89, 89);" class="">mailto:<span class="Apple-converted-space"> </span><a href="mailto:giuseppeangelo.zito@hest.ethz.ch" class="">giuseppeangelo.zito@hest.ethz.ch</a><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<span id="cid:6EE63F38-093C-4B83-A874-FED1CF8C9AAC"><Untitled.png></span><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_Yw6qS8Z5niJVPKpRGNnGlL7pmqC9sbtd8zsEvVYoivZqCt0pPdamcl6IWl_kpYELPkMcqTeMrU8sw6NzkN140T2g1iK5gvA0jr9mQ$" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_Yw6qS8Z5niJVPKpRGNnGlL7pmqC9sbtd8zsEvVYoivZqCt0pPdamcl6IWl_kpYELPkMcqTeMrU8sw6NzkN140T2g1iK5gvA0jr9mQ$</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><span class="Apple-converted-space"> </span> </span></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>