[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding peaks/max in a graph
From: 
John W. Eaton 
Subject: 
Re: Finding peaks/max in a graph 
Date: 
Tue, 13 Apr 2004 16:35:35 0500 
 David Bateman David dot Bateman at motorola dot com wrote:

 :> a = [1 2 3 4 5 4 3 2 1 2 3 2 1]'; n = length(a);
 :> peaks = find([a(2:n,1)  a(1:n1,1) < 0; 1] & [1; a(1:n1,1)  a(2:n,1)
<0])
 peaks =
 5
 11

 Just a small remark:

 [...]
This message was really from address@hidden, the From: line in
the header was munged when I forwarded the message to the list.
jwe

Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html

 Finding peaks/max in a graph, edAqa mortoray, 2004/04/05
 Re: Finding peaks/max in a graph, David Bateman, 2004/04/05
 Re: Finding peaks/max in a graph, edAqa mortoray, 2004/04/05
 Re: Finding peaks/max in a graph, Joe Koski, 2004/04/05
 Re: Finding peaks/max in a graph, edAqa mortoray, 2004/04/05
 Re: Finding peaks/max in a graph, David Bateman, 2004/04/05
 Re: Finding peaks/max in a graph, Thomas Shores, 2004/04/05
 Re: Finding peaks/max in a graph, David Bateman, 2004/04/05