Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to reverse the algorithm
Date: Sat, 29 Nov 2008 01:45:04 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 16
Message-ID: <ggq6r0$13l$1@fred.mathworks.com>
References: <ggps7i$qok$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1227923104 1141 172.30.248.37 (29 Nov 2008 01:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 29 Nov 2008 01:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:503730


Dear Neo!

> for i=1:L
>     if energy(i)>z
>         startindex=i
>     end
> end
> 
> Hi I have this program to  find the first frame where energy is above Z, hence found the start of a word. I now need to reverse the energy matrix and perform the algorithm again to find the end of the word. 

Instead of the loop, you can please FIND to find start and end points:
  Index = find(energy > z);
  startIndex = Index(1);
  endIndex = Index(end);

Jan