Date: Jan 20, 2013 1:56 PM
Author: Mohammad
Subject: Count numbers considering all cosecutive as one

Hi, I need to count some numbers like:
Data=2, 3, 4, 7,8 9, 10, 20,25,27;
2,3,4=1;
7,8,9,10=1;
20=1; 25=1; 27=1;
total count=5 (1+1+1+1+1)
i.e. consecutive numbers should be count as one together and any individual value should be one.
Any help regarding matlab programming would be highly appreciated.
Thanks in advance.
Badrul