[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compute all pairwise diffs
From: |
Claudio Belotti |
Subject: |
Re: compute all pairwise diffs |
Date: |
Fri, 8 Jul 2011 16:50:06 +0100 |
On Fri, Jul 8, 2011 at 16:10, CdeMills <address@hidden> wrote:
> I wanted to look it the distance was not below some threshold. The call
> unique([1 1+eps])
> returns a set with two values, which doesn't make much sense in my case:
> such tiny difference may result from pure numerical error, and not from
> "real" data separation.
I see, then you can modify unique.m to suit your needs?
I suppose you just need to change
match = (y(1:n-1) == y(2:n));
into
match = (abs(y(1:n-1) - y(2:n))<=tolerance);
to find the differences within a given tolerance