<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="">
Dear Sarah,
<div class=""><br class="">
</div>
<div class="">I am a bit confused by the cfg that you report: there are the options length/overlap, and the options method/runica. Typically, the options length/overlap - if defined - are used for a call to ft_redefinetrial. The options method/runica pertain
to a function call to ft_componentanalysis. It is generally good practice to try and keep the cfg as clean as possible, i.e. create a new or empty cfg each time you call a new fieldtrip function.</div>
<div class=""><br class="">
</div>
<div class="">Now, as to the error message: I don’t have a clue what’s going on, but what I noticed is that Matlab uses a version of runica which is on your /usr/local/EEGLAB2022/<etc>. This might in itself not be the cause of the problem, but I would want
to rule out the possibility that there is an inconsistency caused by using a ‘wrong’ version of the runica code. FieldTrip has a version of runica in fieldtrip/external/eeglab.</div>
<div class=""><br class="">
</div>
<div class="">Perhaps you could first try to clean the matlab path with the restoredefaultpath command, and then only add the path to the fieldtrip folder, followed by ft_defaults. This is explained on <a href="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/faq/should_i_add_fieldtrip_with_all_subdirectories_to_my_matlab_path/__;!!HJOPV4FYYWzcc1jazlU!5DC4BJ4FTZPvSY3QH4ghaT60a0nxPj8jbmx2X3pMCk-n0-Uli10MwOCm6A7kE5paC3WlWq4ij2u7Xp_mdkRLJaNUVYiTMI4B55DM0g$" class="">https://www.fieldtriptoolbox.org/faq/should_i_add_fieldtrip_with_all_subdirectories_to_my_matlab_path/</a></div>
<div class=""><br class="">
</div>
<div class="">If you then run ft_componentanalysis, matlab should use the one that is shipped with fieldtrip. If the problem then persists, I recommend you to put a breakpoint in the code (of runica), and then go through the code step-by-step to try and understand
why the variable ’sphere’ is not created during the function’s execution.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Jun 2023, at 20:38, Margerison, Sarah 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="elementToProof" 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;">
Hello,</div>
<div class="elementToProof" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
I am getting the following error message attempting to use runica: Output argument "sphere" (and maybe others) not assigned during call to "runica"</div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
This is occurring in a script which was working a few weeks ago when I ran it last. We are running fieldtrip version 20211008 on Matlab 2019b. As far as I know, nothing has been updated since I last used the script. </div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
Currently, these are the fields in the cfg variable:</div>
<div class="elementToProof ContentPasted0" 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;">
length = 4</div>
<div class="elementToProof ContentPasted0" 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;">
overlap = 0</div>
<div class="elementToProof ContentPasted0" 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;">
method = 'runica'</div>
<div class="elementToProof ContentPasted0" 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;">
runica = 1x1 struct (cfg.runica.pca =15)</div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
I've also used length = 1.75 and pad = 4 and had the same issue. </div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
I ran which runica and got the following: /usr/local/EEGLAB2022/eeglab2022.1/functions/sigprocfunc/runica.m</div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
I understand that this is an externally called function, but I am still hoping to get some clarity on what might be wrong. Is there a specific field I should be adding that I am not? And what is the possible reason for the script to no longer want to run?</div>
<div class="elementToProof ContentPasted0" 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;">
<br class="">
</div>
<div class="elementToProof ContentPasted0" 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;">
Thanks very much for your help!</div>
<div class="elementToProof" 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;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
<div id="Signature" class="">
<div class="">
<div class=""><font face="Calibri, sans-serif, serif, EmojiFont" style="color: rgb(33, 33, 33);" class=""><span style="font-size: 11pt; font-family: Cambria, Georgia, serif;" class="">Sarah Margerison, DPT</span></font></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<span style="font-size: 11pt;" class=""></span>
<div style="margin: 0px; text-align: start; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Cambria, Georgia, serif; font-size: 11pt;" class="">Graduate Student</span><br class="">
<span style="font-family: Cambria, Georgia, serif; font-size: 11pt; color: rgb(33, 33, 33);" class="">University of Maryland School of Medicine</span><br class="">
</div>
<span style="font-size: 11pt;" class=""></span>
<div style="text-align: start; font-size: 11pt; font-family: Calibri, sans-serif; margin: 0px; color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Cambria, Georgia, serif; font-size: 11pt;" class="">Dept. of Physical Therapy & Rehabilitation Science</span><br class="">
<span style="margin: 0px; font-size: 11pt; font-family: Cambria, Georgia, serif; color: rgb(32, 31, 30);" class="">Univer</span><span style="margin: 0px; font-size: 11pt; font-family: Cambria, Georgia, serif; color: rgb(32, 31, 30);" class="">sity of Maryland,
School of Dentistry</span><br class="">
<span style="margin: 0px; font-size: 11pt; font-family: Cambria, Georgia, serif; color: rgb(32, 31, 30);" class="">Dept. of Neural and Pain Sciences</span><br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; color: rgb(32, 31, 30);" class="">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; color: rgb(32, 31, 30);" class="">
<span style="font-size: 11pt;" class=""></span><span style="margin: 0px; font-family: Cambria, Georgia, serif; font-size: 11pt;" class="">650 W. Baltimore Street, Room 8404</span></div>
<div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; color: rgb(32, 31, 30);" class="">
<span style="font-size: 11pt;" class=""></span><span style="margin: 0px; font-family: Cambria, Georgia, serif; font-size: 11pt;" class="">Baltimore, MD 21201</span></div>
<span style="font-family: Cambria, Georgia, serif; font-size: 11pt;" class=""><a href="mailto:smargerison@som.umaryland.edu" class="">smargerison@som.umaryland.edu</a></span></div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">
<br class="">
</div>
</div>
</div>
</div>
<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!9L0y_TJtt8nGjgDS1f4POXsXftteUgT8qMoIkBKT92y2hHEHpIoczvasRHm5RFpnAas_NsXXscdNq6lj81jYQml0RCQVo3wK-NPCPQ$" 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!9L0y_TJtt8nGjgDS1f4POXsXftteUgT8qMoIkBKT92y2hHEHpIoczvasRHm5RFpnAas_NsXXscdNq6lj81jYQml0RCQVo3wK-NPCPQ$</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></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>