[FieldTrip] Cross correlation using xcorr in ft_connectivityanalysis

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Thu Mar 24 13:29:09 CET 2011

Dear Stan,

Apologies for giving you high hopes. Based on the documentation of the  
function ft_connectivityanalysis, the false impression is suggested  
that cross-correlations can be computed using FieldTrip. We did  
however not yet have time to actually implement this, although this is  
on our to do list. The error you report is caused by something  
unrelated to this, but would you be able to solve that one, it will  
still not be possible to compute the xcorr. I will remove this error  
from the documentation of the ft_connectivityanalysis function as soon  
as possible. What you can do, though, is to compute coherence, which  
is the frequency domain equivalent of the cross correlation, but I  
don't know whether this fits your research interests.

Best wishes,


On Mar 24, 2011, at 12:06 PM, <s.j.f.verwer at student.utwente.nl> <s.j.f.verwer at student.utwente.nl 
 > wrote:

> Hi,
> I am a new user of Field Trip, and my Matlab knowledge is ok, but  
> restricted. I am trying to calculate the cross correlation of two  
> EMG signals, using ft_connectivity analysis, with cfg.method     =  
> 'xcorr'; Unfortunately I receive this error:
> ??? Undefined function or variable "inparam".
> Error in ==> ft_connectivityanalysis at 196
> if any(~isfield(data, inparam)) || (isfield(data, 'crsspctrm') &&  
> (ischar(inparam) && strcmp(inparam,
> 'crsspctrm'))),
> Indeed when looking in the ft_connectivityanalysis.m, inparam is not  
> specified for xcorr and corr:
> case {'corr' 'xcorr'}
>     data = ft_checkdata(data, 'datatype', 'raw');
> Could anybody help with this problem?
> Thanks in advance,
> Stan Verwer
> University of Twente
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110324/2aad0c5b/attachment-0002.html>

More information about the fieldtrip mailing list