[FieldTrip] Cross correlation using xcorr in ft_connectivityanalysis

s.j.f.verwer at student.utwente.nl s.j.f.verwer at student.utwente.nl
Fri Mar 25 15:00:50 CET 2011


Hi Jan-Mathijs,

Thank you for your quick response. Actually, I already calculated the
coherence with the Fieldtrip Toolbox and that worked out for me indeed.
However, in my research I focus on inter- and intramuscular
coherence/synchrony and I'd like to have information both in frequency
and time domain. For my research assignment it is important to analyze
the lag between the EMG signals in order to characterize e.g. the origin
of synchrony. A lot of researchers in this area work with the cumulant
density function (using the Neurospec toolbox, Halliday et al.), but
that is in my opinion similar to the xcorr-function in MATLAB. Do you
advise me to use the "standard" xcorr function in MATLAB or do you have
other ideas? You'd help me a lot!

Best wishes,

Stan 

------------------------------

Message: 4
Date: Thu, 24 Mar 2011 13:29:09 +0100
From: jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
To: Email discussion list for the FieldTrip project
	<fieldtrip at donders.ru.nl>
Subject: Re: [FieldTrip] Cross correlation using xcorr in
	ft_connectivityanalysis
Message-ID: <56962338-5355-4E04-BA41-DE1ADEAB73A1 at donders.ru.nl>
Content-Type: text/plain; charset="us-ascii"; Format="flowed";
	DelSp="yes"

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,

Jan-Mathijs


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




More information about the fieldtrip mailing list