[FieldTrip] Runica: Output argument "sphere" (and maybe others) not assigned during call to "runica"

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Sat Jun 10 11:44:49 CEST 2023


Dear Sarah,

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.

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.

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 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$ 

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.

Good luck,

Jan-Mathijs




On 9 Jun 2023, at 20:38, Margerison, Sarah via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hello,

I am getting the following error message attempting to use runica:  Output argument "sphere" (and maybe others) not assigned during call to "runica"

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.

Currently, these are the fields in the cfg variable:
length = 4
overlap = 0
method = 'runica'
runica = 1x1 struct (cfg.runica.pca =15)

I've also used length = 1.75 and pad = 4 and had the same issue.

I ran which runica and got the following: /usr/local/EEGLAB2022/eeglab2022.1/functions/sigprocfunc/runica.m

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?

Thanks very much for your help!

Sarah Margerison, DPT
Graduate Student
University of Maryland School of Medicine
Dept. of Physical Therapy & Rehabilitation Science
University of Maryland, School of Dentistry
Dept. of Neural and Pain Sciences
650 W. Baltimore Street, Room 8404
Baltimore, MD  21201
smargerison at som.umaryland.edu<mailto:smargerison at som.umaryland.edu>

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!9L0y_TJtt8nGjgDS1f4POXsXftteUgT8qMoIkBKT92y2hHEHpIoczvasRHm5RFpnAas_NsXXscdNq6lj81jYQml0RCQVo3wK-NPCPQ$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230610/4d1e959e/attachment.htm>


More information about the fieldtrip mailing list