[FieldTrip] EEG data as Matlab matrix

Narayan Puthanmadam Subramaniyam narayan.ps at tut.fi
Thu Jun 21 13:00:32 CEST 2012


On Thu, 21 Jun 2012 12:04:56 +0200
Eelke Spaak <eelke.spaak at donders.ru.nl> wrote:

> Hi Narayan,
> 
> How does your data structure look after you import it? I.e. what do
> you get when you type
> 
> >> data
> 
> into matlab? (Assuming your structure is called 'data'.) Most likely,
> you did not convert your data 100% correctly, since ft_checkdata does
> not recognize it as proper fieldtrip data. Post the details, and we
> can probably help.
> 
> Best,
> Eelke
> 
> On 21 June 2012 11:55, Narayan <narayan.ps at tut.fi> wrote:
> > Hi
> >
> > Thanks for the reply. I created the data structure as explained in
> > the link using matlab data matrix. I am interested in preprocessing
> > the EEG data ( filtering, artifact removal etc).
> >
> > How can I use this data structure to pass on to the functions that
> > do preprocessing. When I use the ft_preprocessing function with cfg
> > and data as input parameters, I get the following error
> >
> > ??? Error using ==> ft_checkdata at 265
> > This function requires raw data as input.
> >
> > Error in ==> ft_preprocessing at 281
> >  data = ft_checkdata(data, 'datatype', 'raw',
> >  'hassampleinfo', 'yes');
> >
> >
> > --
> > Best Regards,
> > Narayan
> >
> >
> >
> >
> > Quoting "Magyari, Lilla" <Lilla.Magyari at mpi.nl>:
> >
> >> Hi,
> >>
> >> this FAQ describes how  you can make your data compatible with
> >> FieldTrip:
> >>
> >> http://fieldtrip.fcdonders.nl/faq/how_can_i_import_my_own_dataformat
> >>
> >> I hope this helps.
> >>
> >> Best,
> >> Lilla
> >>
> >> Narayan Puthanmadam Subramaniyam wrote:
> >>>
> >>> Hello all,
> >>>
> >>> I have EEG data in the format of matrix in Matlab (samples X
> >>> channels). How can I import this into fieldtrip for further
> >>> analysis ? I read that fieldtrip supports only standard EEG
> >>> formats.
> >>>
> >>> Any help will be appreciated by this novice field trip user!
> >>>
> >>>
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >>
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Hi

I realized the mistake now. Instead of data.label, i had typed
data.labels and hence the condition 

isfield(data, 'label') && isfield(data, 'time') && isa(data.time,
'cell') && isfield(data, 'trial') && isa(data.trial, 'cell') was
getting violated.

Thanks for the help! It works now! Now my data gives type as raw when I
run the ft_datatype function.

-- 
Best Regards

Narayan Puthanmadam Subramaniyam, M.Sc
PhD student/researcher
Department of Biomedical Engineering, Tampere University of Technology
Finn Medi 1, 4th Floor, Room 203
FI 33520, Finland




More information about the fieldtrip mailing list