Path: news.mathworks.com!not-for-mail From: "Daniel Robbins" <d.w.e.robbins@gmail.com> Newsgroups: comp.soft-sys.matlab Subject: Non linear association Date: Fri, 18 Jan 2013 21:27:07 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 19 Message-ID: <kdcenb$s4n$1@newscl01ah.mathworks.com> Reply-To: "Daniel Robbins" <d.w.e.robbins@gmail.com> NNTP-Posting-Host: www-03-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1358544427 28823 172.30.248.48 (18 Jan 2013 21:27:07 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Fri, 18 Jan 2013 21:27:07 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2776992 Xref: news.mathworks.com comp.soft-sys.matlab:786835 Hi, I am trying to establish the best way to check the similarity of the pattern of change in two signals/vectors. For a simple example I generated four datasets. One positive parabolic curve, one equal negative curve, one smaller positive curve with a time lag and one vector with a fixed value e.g. [6 6 6 6 6 6 ...etc]. All vectors were the same lengths. My thinking is that I should use some sort of cross correlation e.g. [Rxy, Lag] = xcorr(data(:,4),data(:,3)); plot(Lag,Rxy) By changing the two signals compared I note that the peak of the graph changes location. Therefore I could use the x axis values to calculate the lag in the signal. However I don't understand the values on the Y-axis. I also note that if I input the fixed value vector the graph becomes platykurtic, I'm not sure how to interpret this. Please can someone help me with the following queries: 1.) How do I interpret the Y-values of the graph? 2.) Is there some way of quantifying the level of agreement in the form of liner correlations e.g. from -1 to 1? Or via p-values? 3.) Is this the best approach to analyse the pattern of change in two non linear signals or is there a better approach? Many thanks Dan