Path: news.mathworks.com!not-for-mail
From: "hemant " <swarnkar@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Consecutive Numbers !
Date: Fri, 21 Dec 2007 08:35:15 +0000 (UTC)
Organization: daiict
Lines: 21
Message-ID: <fkfts3$bku$1@fred.mathworks.com>
References: <fkf1sr$a05$1@fred.mathworks.com>
Reply-To: "hemant " <swarnkar@mathworks.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1198226115 11934 172.30.248.37 (21 Dec 2007 08:35:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 21 Dec 2007 08:35:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1002763
Xref: news.mathworks.com comp.soft-sys.matlab:443279


"alan dinno" <alan_dinno@hotmail.com> wrote in message 
<fkf1sr$a05$1@fred.mathworks.com>...
> Hi -
> 
> If V is a col vector, I want H to be the number of 
highest 
> consecutive sequential count in V.
> 
> Example: If V=[22; 23; 24; 40; 44; 50; 51; 52; 53]
> Then, since the highest consecutive count comes from 
> numbers 50,51,52 and 53,it means H=4.
> 
> Another example:
>  If V=[6; 9; 14; 15; 16; 50; 58; 52; 53], then since the 
> highest consecutive count comes from 14,15,16, it means 
> H=3.
> 
> Thanks
> al
Hi rojar, this logic gives '1' when their is no sequence of 
consicutive number.