<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 Martin,
<div class=""><br class="">
</div>
<div class="">Unfortunately I cannot access the data that you uploaded to onedrive. Can you share through dropbox instead, or wetransfer?</div>
<div class=""><br class="">
</div>
<div class="">I have tried to reproduce your issue by copying over the cfg, and filling in the blanks, w.r.t. data headmodel and grid, using educated guesses. On my end it works, so if anything I suspect there to be an interaction between your specific data
 and the code.</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><br class="">
<blockquote type="cite" class="">
<div class="">On 2 Jul 2020, at 10:08, Martin Schaefer <<a href="mailto:martin.schaefer@ki.se" class="">martin.schaefer@ki.se</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="OwaReferenceAttachments" contenteditable="false" 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="">
<table style="padding-bottom: 13px; border-width: 0px; border-style: none;" class="">
<tbody class="">
<tr valign="top" class="">
<td class="">
<table style="border-width: 0px 0px 1px; border-color: rgb(199, 199, 199); border-style: none none dotted;" class="">
<tbody class="">
<tr valign="top" class="">
<td style="padding-bottom: 7px;" class="">
<table align="left" style="padding-right: 28px; border-width: 0px; background-color: rgb(255, 255, 255); border-spacing: 0px;" class="">
<tbody class="">
<tr valign="top" class="">
<td style="padding: 0px;" class="">
<div id="OwaReferenceAttachmentDescription" style="padding-left: 3px; font-size: 14px; font-family: "Segoe UI", "Segoe WP", "Segoe UI WPC", Tahoma, Arial, sans-serif; color: rgb(102, 102, 102);" class="">
Martin Schaefer has shared a OneDrive for Business file with you. To view it, click the link below.</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr valign="top" class="">
<td class=""><a href="https://kise-my.sharepoint.com/personal/martin_schaefer_ki_se/Documents/Bifogade%20filer/debugging_files.rar" target="_blank" class="">
<table align="left" style="padding-right: 28px; padding-bottom: 10px; border-width: 0px; height: 20px; background-color: rgb(255, 255, 255); border-spacing: 0px;" class="">
<tbody class="">
<tr valign="top" class="">
<td style="padding: 0px;" class="">
<div style="background-color: rgb(255, 255, 255); height: 20px; width: 20px; max-height: 20px;" class="">
<a href="https://kise-my.sharepoint.com/personal/martin_schaefer_ki_se/Documents/Bifogade%20filer/debugging_files.rar" target="_blank" class=""><img width="20" src="https://r1.res.office365.com/owa/prem/images/dc-generic_20.png" style="border: 0px;" class=""></a></div>
</td>
<td class="">
<div id="OwaReferenceAttachmentFileName2" style="padding: 0px 0px 0px 5px; font-size: 14px; font-family: "Segoe UI", "Segoe WP", "Segoe UI WPC", Tahoma, Arial, sans-serif; color: rgb(0, 114, 198);" class="">
<a href="https://kise-my.sharepoint.com/personal/martin_schaefer_ki_se/Documents/Bifogade%20filer/debugging_files.rar" target="_blank" style="text-decoration: none; margin: 0px; font-size: 14px; font-family: "Segoe UI", "Segoe WP", "Segoe UI WPC", Tahoma, Arial, sans-serif; color: rgb(0, 114, 198);" class="">debugging_files.rar</a></div>
</td>
</tr>
</tbody>
</table>
</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div style="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; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div 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="">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
Dear Jan-Mathijs,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
Thanks for getting back to me!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
I did the debugging steps you recommended and attached a screenshot of the sourcemodel, the index gets created correctly as well.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
I attached the data you asked for as a zip file, because they are ~110 mb I have to share them via OneDrive.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
I also realised that I had writen down the wrong cfg configurations; these are the ones that lead to the error:</div>
<blockquote style="border-left-width: 3px; border-left-style: solid; border-color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);" class="">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span class="">cfg = [];<br class="">
</span>
<div class="">cfg.gridsearch         = 'yes';            <br class="">
</div>
<div class="">cfg.numdipoles      = 2;           <br class="">
</div>
<div class="">cfg.symmetry         = 'x';          <br class="">
</div>
<div class="">cfg.grid                    = leadfield_eeg;    <br class="">
</div>
<div class="">cfg.headmodel       = headmodel_eeg;   <br class="">
</div>
<div class="">cfg.dipfit.metric     = 'rv';             <br class="">
</div>
<div class="">cfg.model                = 'regional';      <br class="">
</div>
<div class="">cfg.senstype           = 'eeg';            <br class="">
</div>
<div class="">cfg.channel             = 'all';           <br class="">
</div>
<div class="">cfg.nonlinear          = 'yes';            <br class="">
</div>
<div class="">cfg.latency              = late_latency;     <br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span class="">dipole_eeg_late = ft_dipolefitting(cfg, timelockeds{4});</span><br class="">
</div>
</blockquote>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span class=""><br class="">
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span class="">Best regards,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span class="">Martin</span></div>
<div id="Signature" class="">
<div class="">
<div class=""></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" size="1" class=""><span lang="en-US" style="margin: 0px;" class=""><span style="color: rgb(118, 113, 113); font-family: Calibri, sans-serif; font-size: 12px; text-align: left; background-color: rgb(255, 255, 255); display: inline !important;" class="">------------</span><br class="">
</span></font></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" size="1" class=""><span lang="en-US" style="margin: 0px;" class=""><b class="">Martin Schaefer | </b></span></font><span style="font-family: Tahoma; font-size: x-small;" class="">PhD Student</span></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" size="1" class=""><span style="font-family: Tahoma; font-size: x-small; background-color: rgb(255, 255, 255); display: inline !important;" class=""><a href="https://www.perceptionlab.se/" class="">https://www.perceptionlab.se/</a><br class="">
</span></font></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" size="1" class="">Department of Clinical Neuroscience (CNS), K8</font></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<font color="#333333" size="1" class="">Karolinska Institutet | 17 177 Stockholm | Nobels väg 9</font></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<span lang="en-US" style="margin: 0px;" class=""><font color="gray" size="1" class=""><a href="mailto:artin.arshamian@ki.se" target="_blank" rel="noopener noreferrer" style="margin: 0px;" class="">martin.schaefer@ki.se</a></font></span></div>
<div style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);" class="">
<span lang="en-US" style="margin: 0px;" class=""><font color="gray" size="1" class="">______________________________________<br class="">
Karolinska Institutet – a Medical University</font></span></div>
<br class="">
</div>
</div>
</div>
</div>
<div id="appendonsend" 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="">
</div>
<hr tabindex="-1" 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; display: inline-block; width: 1093.671875px;" 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=""></span>
<div id="divRplyFwdMsg" dir="ltr" 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="">
<font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>> on behalf of Schoffelen,
 J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" class="">jan.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, July 1, 2020 4:45 PM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] Potential bug using ft_dipolefitting with fieldtrip-20200623</font>
<div class=""> </div>
</div>
<div class="" 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; word-wrap: break-word; line-break: after-white-space;">
Dear Martin,
<div class=""><br class="">
</div>
<div class="">Thanks for your message. Sorry to hear that you experience some issues. ft_dipolefitting has received a facelift recently, so it could be that the issue you report is a genuine problem. On the other hand, it could also be that something unexpected
 happens due to an unexpected feature in your data, which causes an error in the changed code. Our battery of test functions apparently ran through just fine, causing the changed function to percolate into the relase version of the codebase. Yet, our tests
 are not exhaustive, and it could be that there are user scenarios that we haven’t thought of.</div>
<div class=""><br class="">
</div>
<div class="">In order to be able to make the distinction between a genuine bug, and an interaction between features-of-the-specific-usecase and the updated code, could you investigate a bit more what’s going on, using the matlab debugger? If you put a breakpoint
 in the code on line 442 (or so), or type ‘dbstop if error’ on the matlab command line, and then execute ft_dipolefitting again, you should be able to investigate the content of the variables. Specifically, it would be interesting to know what the content is
 of the ‘sourcemodel' variable, as well as whether the variable ‘indx’ is properly created on line 442.</div>
<div class=""><br class="">
</div>
<div class="">Alternatively, you could send us some data (essentially the timelockds{4} + leadfield_eeg + headmodel_eeg which would allow us to reproduce the issue and, if needed, make a fix.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 1 Jul 2020, at 13:35, Martin Schaefer <<a href="mailto:martin.schaefer@ki.se" class="">martin.schaefer@ki.se</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
Dear all,</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br class="">
</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
I ran into the following error message when calling the ft_dipolefitting function on my data:</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br class="">
</div>
<blockquote class="" style="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; text-decoration: none; border-left-width: 3px; border-left-style: solid; border-color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="">Error using reshape<br class="">
</span>
<div class="">Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Error in ft_dipolefitting (line 444)<br class="">
</div>
<div class="">      dip.pos = reshape(dip.pos,3,cfg.numdipoles)';     % convert to a Nx3 array<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Error in dipole_fitting (line 152)<br class="">
</div>
<span class="">dipole_eeg_late = ft_dipolefitting(cfg, timelockeds{4});</span><br class="">
</div>
</blockquote>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br class="">
</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
My cfg commands:</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<blockquote class="" style="border-left-width: 3px; border-left-style: solid; border-color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); font-size: 10pt;">cfg = [];</span><span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><br class="">
</span>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.gridsearch         = 'yes';            </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.numdipoles      = 1;                </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.symmetry         = [];              </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.grid                    = leadfield_eeg;    </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.headmodel      = headmodel_eeg;    </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.dipfit.metric    = 'rv';             </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.model               = 'regional';       </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.senstype          = 'eeg';           </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.channel           = 'all';            </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.nonlinear        = 'yes';            </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.latency             = early_latency;    </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<span class="" style="font-size: 10pt;">cfg.backproject     = 'yes';            </span><br class="">
</div>
<div class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<br class="">
</div>
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); font-size: 10pt;">dipole_eeg_early = ft_dipolefitting(cfg, timelockeds{4});</span><br class="">
</blockquote>
</div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><br class="">
</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><br class="">
</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">However, the code runs fine on an older version of fieldtrip (the one used during the last online fieldtrip workshop, I think it is
 from 16-04-2020).</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><br class="">
</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">So I'm not sure whether there is a bug in one of the versions or something else is wrong.</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">Does anyone else have issues with this?</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"><br class="">
</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">Best regards,</span></div>
<div class="" style="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; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<span class="" style="margin: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">Martin</span></div>
<div class="" style="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; text-decoration: none;">
<div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br class="">
</div>
<div id="x_Signature" class="">
<div class="">
<div class=""></div>
<div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<font color="#333333" size="1" class=""><span lang="en-US" class="" style="margin: 0px;"><span class="" style="color: rgb(118, 113, 113); font-family: Calibri, sans-serif; font-size: 12px; text-align: left; background-color: rgb(255, 255, 255); display: inline !important;">------------</span><br class="">
</span></font></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<font color="#333333" size="1" class=""><span lang="en-US" class="" style="margin: 0px;"><b class="">Martin Schaefer | </b></span></font><span class="" style="font-family: Tahoma; font-size: x-small;">PhD Student</span></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<font color="#333333" size="1" class=""><span class="" style="font-family: Tahoma; font-size: x-small; background-color: rgb(255, 255, 255); display: inline !important;"><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.perceptionlab.se%2F&data=02%7C01%7Cmartin.schaefer%40ki.se%7C268947d09a27414b01c008d81dcd9bba%7Cbff7eef1cf4b4f32be3da1dda043c05d%7C0%7C0%7C637292116200198856&sdata=w9gFEvzSeKwxySOWwnCbR9%2F%2BzWXWeBTjVi1KFq9oJUY%3D&reserved=0" originalsrc="https://www.perceptionlab.se/" shash="S64WTaqSnlX+rcOPn7W4At+Ff1OHiEvbpFcdy96/dKYXJ0GRRoK8zlEl+F2rX6T4HM6SIX2XA9aoutnEcjP8ZB8yV7hAkvudLVtYvKdikDsZL2ufrFBtoYiOErWEv9xCnVV9xwnz369AcgFRFYOdkbmlGsECQuskcgUDwic2snU=" class="">https://www.perceptionlab.se/</a><br class="">
</span></font></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<font color="#333333" size="1" class="">Department of Clinical Neuroscience (CNS), K8</font></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<font color="#333333" size="1" class="">Karolinska Institutet | 17 177 Stockholm | Nobels väg 9</font></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<span lang="en-US" class="" style="margin: 0px;"><font color="gray" size="1" class=""><a href="mailto:artin.arshamian@ki.se" target="_blank" rel="noopener noreferrer" class="" style="margin: 0px;">martin.schaefer@ki.se</a></font></span></div>
<div class="" style="margin-top: 0px; margin-bottom: 0px; color: rgb(32, 31, 30); font-family: Tahoma; font-size: 13px; text-align: start; background-color: rgb(255, 255, 255);">
<span lang="en-US" class="" style="margin: 0px;"><font color="gray" size="1" class="">______________________________________<br class="">
Karolinska Institutet – a Medical University</font></span></div>
<br class="">
</div>
</div>
</div>
</div>
<div class="" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Times; min-height: 14px; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;">
<span class="x_s1"></span><br class="">
</div>
<div class="" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Times; min-height: 14px; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;">
<span class="x_s1"></span><br class="">
</div>
<div class="" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Times; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;">
<span class="x_s1"><i class="">När du skickar e-post till Karolinska Institutet (KI) innebär detta att KI kommer att behandla dina personuppgifter.<span class="x_Apple-converted-space"> </span></i><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fki.se%2Fmedarbetare%2Fintegritetsskyddspolicy&data=02%7C01%7Cmartin.schaefer%40ki.se%7C268947d09a27414b01c008d81dcd9bba%7Cbff7eef1cf4b4f32be3da1dda043c05d%7C0%7C0%7C637292116200198856&sdata=76Of3%2BtLi%2Bzl1prxLy9H0TyY73mCg9kZ6Q%2BfDiTK5Kg%3D&reserved=0" originalsrc="https://ki.se/medarbetare/integritetsskyddspolicy" shash="cdZB/lHsjAFKhFAnY7Wzf7ptAE+I0KQXm0t1gXJMgCKwlB+Ir9cHom9U6/ZtUeyxX3wWbcm2o5xYnnpnzTeoQZGXhtmacBUWEqaoRRFh/zHSjIyGDgbF5/6ekErDf3NozqIQIeDadcWcH14/HTqegwdrp8nT4xlWeQWqt6WbxvE=" class=""><span class="x_s2" style="text-decoration: underline; color: rgb(0, 0, 238);">Här
 finns information om hur KI behandlar personuppgifter</span></a>.<span class="x_Apple-converted-space"> </span></span></div>
<div class="" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Times; min-height: 14px; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;">
<span class="x_s1"></span><br class="">
</div>
<div class="" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Times; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;">
<span class="x_s1"><i class="">Sending email to Karolinska Institutet (KI) will result in KI processing your personal data.</i><span class="x_Apple-converted-space"> </span><a href="https://ki.se/en/staff/data-protection-policy" class=""><span class="x_s2" style="text-decoration: underline; color: rgb(0, 0, 238);">You
 can read more about KI’s processing of personal data here</span></a>.<span class="x_Apple-converted-space"> </span></span></div>
<span class="" style="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; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br class="" style="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; text-decoration: none;">
<span class="" style="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; text-decoration: none; float: none; display: inline !important;">fieldtrip
 mailing list</span><br class="" style="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; text-decoration: none;">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7Cmartin.schaefer%40ki.se%7C268947d09a27414b01c008d81dcd9bba%7Cbff7eef1cf4b4f32be3da1dda043c05d%7C0%7C0%7C637292116200208851&sdata=9kimEP3jV2bmlS5CpYcqxlK8%2BzedF4XM4pAyH8%2FL8Zs%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="fa6Fi7zORrFBNH0IWx/VEcZ+m8m2lfiuWe5EUH+MSkLFOuq93yVN47OGj7Jz7YtS+dyEu0/aj1QwtHoj0iKH4WWsKW0Jx2ww6dtQSqBk99o9dsTuxS4ZohsprUS3FA4GtYGiBRPNvGfuZwmoRToJARM0AqPkA53yAJbZwgUnQaQ=" class="" style="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;">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="" style="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; text-decoration: none;">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7Cmartin.schaefer%40ki.se%7C268947d09a27414b01c008d81dcd9bba%7Cbff7eef1cf4b4f32be3da1dda043c05d%7C0%7C0%7C637292116200208851&sdata=F5vmA1DY7S9UMGt1Y94bw%2Bxt9NOn3oGatMKPIZ3zEMU%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="vUw/qdjd0svnES6t+vWFlNNs2CoTIJMdaJfhvREis4IS+8SbHfczmhU5J0UaupBAUhjzLMDEA3Zmg44lxqUcB5MOgYpC9hFPUev6dDzefdzz4yYRmdJaMIuS7GTQE62HzHEZw8xGHzMlt6SrLZGX98NWCLGj3cV2FfZA8xJxG4E=" class="" style="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;">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
<span id="cid:7CB74453-1410-4106-86F2-46F76FDD600D@home"><sourcemodel.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://doi.org/10.1371/journal.pcbi.1002202" 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://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</body>
</html>