[Eeglablist] variables as arguments in pop_importdata()

Klados Manousos mklados at gmail.com
Fri Apr 16 09:35:42 PDT 2010


Dear Nick

According to my opinion it is better to use a numeric system to name your
datasets if you want to automatically insert them into EEGLAB. Suppose that
we have 10 datasets name 1.set,...10.set then with the next code you can
insert them in a loop

for i=1:10
    tic
    a=int2str(i)
    eeglab
    filename=[a '.set'];
    EEG = pop_loadset('filename', filename,'filepath','C:\...)
    eeglab redraw

    (continue code...and do whatever you want)
end;

On the other hand if you dont want, or if you cant change the names of your
variables you can make a structure or a character array...but you have to
search for this further in Matlab's help

I hope to helped you

Best Regards
Manousos

2010/4/15 Nick Bedo <nickbedo at yahoo.com>

> Hi all,
>
> I'm importing data as part of a loop, and I'm trying to automate certain
> parameters of the pop_importdata() function.  Specifically, I'm trying to
> add a variable as an input argument, but I can't seem to figure it out.
>  Here is the line of code that I'm working on:
>
>     EEG =
> pop_importdata('dataformat','array','data','temp2','srate',200,'pnts',0,'xmin',0,'nbchan',0,
> 'setname', 'currfile');
>
> 'currfile' is the name that I want to change with each iteration of the
> loop.  Any and all contributions are appreciated.
>
> Thanks,
> Nick
>
>
> _______________________________________________
> 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
>



-- 
Manousos A. Klados
PhD Candidate -- Research Assistant
Group of Applied Neurosciences
Lab of Medical Informatics
School of Medicine
Aristotle University of Thessaloniki
P.O. Box 323 54124 Thessaloniki Greece
_________________________________________________
Tel: +30-2310-999332
Fax:+30-2310-999263
Website: http://lomiweb.med.auth.gr/gan/mklados

________________________________________________________________
Δρώ γιατί Αντιδρώ: Δεν τυπώνω αυτό το mail γιατί προστατεύω το περιβάλλον.
Acting by Reacting: By not printing this e-mail I help protect the
environment.
________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20100416/b05128d6/attachment.html 


More information about the eeglablist mailing list