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: NNTP Server
Lines: 30
Message-ID: <jo145s$v8c$>
References: <jo0uls$gql$> <jo0vse$ij5$> <jo120o$2kc$>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20120216 Thunderbird/3.1.19
X-Notice: Filtered by postfilter v. 0.8.2
Xref: 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 

 > 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)