From: aa <dragonboy.ali@gmail.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: Find beginning of epoches
Message-ID: <ef5cd86.6@webcrossing.raydaftYaTP>
Date: Tue, 10 Jul 2007 17:52:44 -0400
References: <ef5cd86.-1@webcrossing.raydaftYaTP> <1183974225.442027.51510@i38g2000prf.googlegroups.com> <ef5cd86.1@webcrossing.raydaftYaTP> <QuedndxFj4ltKQ7bnZ2dnUVZ_jSdnZ2d@speakeasy.net>
Lines: 27
NNTP-Posting-Host: 194.255.124.250
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:418353



idx = find(a <= b);

 epoch = a(max(idx));
 
 sprintf('\n\ta(%d) = %f\n',idx,epoch)

a= 0 3 10 40 50 75 90 102 110 120

b= 103

gives this

	a(1) = 2.000000

	a(3) = 4.000000

	a(5) = 6.000000

	a(7) = 8.000000

	a(102) =

cant , we make

only a(8)=120

thanks