Date: Sep 17, 2013 10:46 PM
Author: Mike
Subject: cluster analysis

Hi
I have a series of sorted number, say
A=[1 25 26 27 28 40 42 50];

I'd like to cluster it clusters. For every cluster, the difference of max and min is within a given specified interval, i.e. max-min<=interval. Say, interval equals 5, then results are
cluster 1: 25 26 27 28
cluster 2: 40 42

I tried pdist(A), but found very hard to go on.
I am wondering if one can given me suggestions.

Thank you very in advance