Dear Bill,
There should be no problem whatsoever for event.value to be a string. So if epoching fails it must be for a different reason. What is the error you got? Perhaps you should send me an example. I'm not sure about NaN as value. That might be a problem because NaN doesn't behave like a normal number in many situations.
If you modified events and want to put them back you can use:
D = events(D, 1, event_struct);
save(D);
Vladimir
Sent from my iPad
On 18 Jun 2010, at 08:42, Bill Budd <[log in to unmask]> wrote:
> Dear Vladimir
>
> I'm preprocessing some Biosemi data in EEGlab and then convert to SPM8 for
> analyses. Problem has been that the format of the event struct (from
> event(D)) has changed since some of the event.value fields contain strings
> (i.e. 'boundary')and so spm_eeg_definetrial fails to create trl. I can
> convert event.struct back to double OK using:
>
> event_struct = events(D);
> event_values = {event_struct.value};
> event_values = str2double(event_values);
> event.value = event_values;
>
> This changes the original strings to 'NaN' (which isnt a problem for me but
> not sure about SPM8?), also not sure how to incoporate this changed format
> event structure into the data using the methods event(D)and save(D). Any
> advice greatfully appreciated.
>
>
> Cheers
> -Bill
|