Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Corrcoef(A,B) when Var(A)=0
Date: Fri, 04 May 2012 12:38:07 -0500
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <jo145s$v8c$1@speranza.aioe.org>
References: <jo0uls$gql$1@newscl01ah.mathworks.com> <jo0vse$ij5$1@speranza.aioe.org> <jo120o$2kc$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: gpexzY2eWcmzKDp4x7HoPQ.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:766850

On 5/4/2012 12:01 PM, laurie wrote:

...[top posting repaired; please don't do that--hard follow conversation 
makes]...

...
 > no i don't think this is autocorrelation : A is different from B, but
 > Var(A)=0
 >
 > if you plotted the vectors along each observation, A would be an
 > horizontal line, but not B.
 >
> the end objective is to have a measure of "ordered distance" between
> A and B.

That would simply be abs(A-B) or perhaps sqrt((A-B).^2))

Play around w/ various values of Z in the following and see if that 
doesn't show what you're asking for...

 >> Z=0.5;
 >> x=1:10;y=exp(-x/10);
 >> plot(x,y)
 >> x=0:10;y=exp(-x/10);
 >> plot(x,y)
 >> c=sqrt((y-Z).^2);
 >> plot(x,y,x,c)
 >>

--