<p dir="ltr">BTW - I gave the wrong function name, sorry.<br>
If you want to pass the data from local function workspace to base workspace you should use:<br>
assignin('base', 'EEG', EEG)</p>
<p dir="ltr">but from a short look at you script I see that you are using assignin there.</p>