<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Thanks Bethel! Your solution worked flawlessly.</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

David</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-01-27 David Kaufman <span dir="ltr">&lt;<a href="mailto:david.kaufman@gmx.de" target="_blank">david.kaufman@gmx.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Thanks Bethel! Your solution worked flawlessly.<div><br></div><div>David</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-01-26 Bethel Osuagwu <span dir="ltr">&lt;<a href="mailto:b.osuagwu.1@research.gla.ac.uk" target="_blank">b.osuagwu.1@research.gla.ac.uk</a>&gt;</span><div>

<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David<br>
There are many ways you can do this. One is to  start EEGLAB normally before running your function: [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;<br>
<br>
Then define ALLEEG, EEG, CURRENTSET  as globals inside your function.<br>
<br>
Bethel<br>
________________________________________<br>
From: <a href="mailto:eeglablist-bounces@sccn.ucsd.edu" target="_blank">eeglablist-bounces@sccn.ucsd.edu</a> [<a href="mailto:eeglablist-bounces@sccn.ucsd.edu" target="_blank">eeglablist-bounces@sccn.ucsd.edu</a>] On Behalf Of David Kaufman [<a href="mailto:david.kaufman@gmx.de" target="_blank">david.kaufman@gmx.de</a>]<br>

Sent: 24 January 2014 08:41<br>
To: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
Subject: [Eeglablist] Using EEGLAB from within a function<br>
<div><div><br>
Hello everyone,<br>
<br>
I&#39;m trying to use EEGLAB from within a function inside a script, e.g.<br>
<br>
function test<br>
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;<br>