<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Stan,<div><br></div><div>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.</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Mar 24, 2011, at 12:06 PM, <<a href="mailto:s.j.f.verwer@student.utwente.nl">s.j.f.verwer@student.utwente.nl</a>> <<a href="mailto:s.j.f.verwer@student.utwente.nl">s.j.f.verwer@student.utwente.nl</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <!-- Converted from text/rtf format --><p><font size="2" face="Courier New">Hi, </font> </p><p><font size="2" face="Courier New">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 </font><font color="#000000" size="2" face="Courier New">cfg.method =</font> <font color="#A020F0" size="2" face="Courier New">'xcorr'</font><font color="#000000" size="2" face="Courier New">; Unfortunately I receive this error:</font></p><p><font color="#000000" size="2" face="Courier New">??? Undefined function or variable "inparam".</font> </p><p><font color="#000000" size="2" face="Courier New">Error in ==> ft_connectivityanalysis at 196</font> <br><font color="#000000" size="2" face="Courier New">if any(~isfield(data, inparam)) || (isfield(data, 'crsspctrm') && (ischar(inparam) && strcmp(inparam,</font> <br><font color="#000000" size="2" face="Courier New">'crsspctrm'))),</font> </p><p><font color="#000000" size="2" face="Courier New">Indeed when looking in the ft_connectivityanalysis.m, inparam is not specified for xcorr and corr:</font> </p><p><font color="#0000FF" size="2" face="Courier New">case</font><font color="#000000" size="2" face="Courier New"> {</font><font color="#A020F0" size="2" face="Courier New">'corr'</font><font color="#000000" size="2" face="Courier New"></font> <font color="#A020F0" size="2" face="Courier New">'xcorr'</font><font color="#000000" size="2" face="Courier New">}</font> <br><font color="#000000" size="2" face="Courier New"> data = ft_checkdata(data,</font> <font color="#A020F0" size="2" face="Courier New">'datatype'</font><font color="#000000" size="2" face="Courier New">,</font> <font color="#A020F0" size="2" face="Courier New">'raw'</font><font color="#000000" size="2" face="Courier New">);</font> </p><p><font size="2" face="Courier New">Could anybody help with this problem?</font> </p><p><font size="2" face="Courier New">Thanks in advance,</font> </p><p><font size="2" face="Courier New">Stan Verwer</font> <br><font size="2" face="Courier New">University of Twente</font> </p> </div> _______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3614793</div></div></span></div></span> </div><br></div></body></html>