Finding local minima and maxima of a graph

jonathandlynch at jonathandlynch at
Sat Dec 4 14:23:52 EST 2010

Does the equation that generates the graph lend itself to finding its first derivative - or are you dealing with data points with no generating equation?

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Bryan McCormick <bryan at>
Sender: use-livecode-bounces at
Date: Sat, 04 Dec 2010 14:10:26 
To: <use-livecode at>
Reply-To: How to use LiveCode <use-livecode at>
Subject: Re: Finding local minima and maxima of a graph


Yes, I have thousands of .csv files to process. I have data that is 
ordered by column containing high and low values.

On 12/4/2010 12:56 PM, Bryan McCormick wrote:
> I have a very large number of graphs to crunch through to find local
> minima and maxima. The data is regularly spaced, which eliminated one
> problem. I know too that the window value used has to be an adjustable
> variable as peak and trough significance may need to be found for a wide
> range of time periods within the data set.
> I had thought of using a moving average to find a slope of zero and then
> use an offset function to find the peak and trough in time.
> I've used stackoverflow to have a look and apparently the problem is a
> lot less trivial than I thought.
> Any suggestions for fitting to a function, using the graphing functions
> in rev, etc would be most welcome.

use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list