[FieldTrip] Weird trialfun_general error

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Fri Jun 10 13:01:58 CEST 2011


Hi Rodolphe,

This is a funny bug. It goes wrong in trialfun_general when the  
intersect() tries to compare a string (event(i).vale being 'boundary')  
with a list of numbers (your event values). This leads in your case to  
unwanted behavior, and I can imagine that this will cause problems  
elsewhere too.

We'll look into it and fix it.

Thanks for the notification.

Best,

Jan-Mathijs


On Jun 7, 2011, at 12:51 AM, Rodolphe Nenert wrote:

> Dear fieldtrippers,
>
> i just noticed and found the origin of a weird error obtained with  
> the trialfun_general function, i thought it could be useful to send  
> it here.
> I use the ft_definetrial function on a file obtained using the merge  
> function in EEGlab. Apparently, this function is adding some  
> triggers with the value 'boundary' in the new file, indicating the  
> old frontier between the dataset that have been merged.
> The funny part is that the trialfun_general() function in fieltrip  
> is using the intersect() matlab function to match event values.  
> Moreover, im using 27 different event values to indicate point of  
> interest (112,114,116,122,etc...)
> All of my event values dont create any problems except the value  
> 114   because intersect('boundary',114) = 114 whereas it gives an  
> empty result with any other of my values...
> Therefore, for that particular event value, there was a dimension  
> mismatch between trl and val in trialfun_general.
>
> I just removed events with 'boundary' values and it worked.
>
> Best regards,
>
> Rodolphe Nenert, Ph.D.
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793




More information about the fieldtrip mailing list