LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Q: Find Peak position of a function

I have a function from a curve fit and I want to find the x locations of
where the peaks (maxima) occur in this function. Is there a LabVIEW vi
that will do this for me?

The way I was thinking of doing it, which sounds like a lot of wasted
computational time, is to basically calculate a certain number of y
values for this function (say 100, 1000, 1000... the higher the number,
the greater the precision of my answer), and find the maximum in that
series of y values. I could maybe do a rough pass with only 100 points
precision, then zoom in on a certain region and do a much higher
precision check (if this will help my function run faster)...

Is this a decent way, or have I missed a VI that will find these peaks for me?


Any help is greatly appreciated!

Brent Kirkwood
fever@yuck.net
0 Kudos
Message 1 of 2
(1,175 Views)
Brent

In earlier LV versions, these functions were part of the g-math tool kit,
but they are now "incorporated".

Invert your function, then use "find all minima 1D.vi" (IN:
mathematics...optimization).

Look at the example: "Integration, Differentiation, Roots, Maxima, and
Minima for an Equation"
(found in: help...search examples...mathematic...general math..)

HTH
Chrisitan

Brent Kirkwood wrote in message
news:bPBW3.4546$rK2.356317@ptah.visi.com...
> I have a function from a curve fit and I want to find the x locations of
> where the peaks (maxima) occur in this function. Is there a LabVIEW vi
> that will do this for me?
>
0 Kudos
Message 2 of 2
(1,175 Views)