[Eeglablist] eeglab function mergeset does weird things to the EEG.event data structure
Toby Fernsler
toby at sccn.ucsd.edu
Wed Aug 23 13:45:24 PDT 2006
That field (EEG.event(index).type) is intended to be a character string.
I think you will ultimately find it easier to work with it as character
strings. Commands like "strcmp" will be very useful in this context.
Toby
abastos at berkeley.edu wrote:
>Hello all
>
>I am having trouble merging 2 data sets that I have imported into eeglab
>from biosemi using the bdf format. The problem is this: I have 2 datasets,
> both of which have intact .event structures. When I use the pop_mergeset
>command to merge both, a bigger dataset is created. so far so good.
>
>The problem occurs when I run my custom script to look at the .event
>structure and toss out events that I wont use. When my script atempts to
>access the EEG.event(index).type there is an error, indicating that the
>data type is unexpectedly a string instead of a number. When I run my
>script on the 2 independent set files prior to merging, everything is
>fine. But after the merging, the EEG.event(index).type field is changed
>from an integer to a character string.
>
>A possible reason for this is that when both sets are appended, a new
>event in between them is created which indicates the boundary between the
>sets. This event is of type "boundary", which is a non-numerical type. So
>in order to create this event with a character string in the type field,
>all other type fields must be changed to character arrays to be
>consistent.
>
>To temporarily fix the problem, Im writing a script to convert all the
>strings back to numbers. Is anyone else having this problem?
>
>Thanks
>
>Andre
>Roberston Lab, UC Berkeley
>
>_______________________________________________
>eeglablist mailing list eeglablist at sccn.ucsd.edu
>Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>
>
More information about the eeglablist
mailing list