[Eeglablist] Using EEGLAB from within a function

berry van den berg berryv.dberg at gmail.com
Fri Jan 24 14:03:55 PST 2014


Hi David,

I would use something like:

function dataOut = loadData(dataPath,filename)
  dataOut = pop_loadbv(dataPath,fileName);
end

then outside the function call
EEG = loadData(dataPath,filename)
eeglab -redraw

cheers,



On 24 January 2014 03:41, David Kaufman <david.kaufman at gmx.de> wrote:

> Hello everyone,
>
> I'm trying to use EEGLAB from within a function inside a script, e.g.
>
> function test
>     [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
>     EEG = pop_loadbv(baseFolder, eegFile);
>     [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET)
>     eeglab redraw
> end
>
> Unfortunatly, as soon as the function returns my data set is not present
> in the GUI. If I put the contents of the above function in the root script
> the data set appears in the GUI.
>
> Is it possible to call EEGLAB from a function and also see the data set or
> am I using EEGLAB wrong?
>
> Regards,
> David Kaufman
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



-- 
Berry van den Berg
berryv.dberg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140124/9d1b675a/attachment.html>


More information about the eeglablist mailing list