local minima
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is there an easy way to find local minima for a curve, starting with discrete data? In other words, if I have a set of x and y values, is there a way that I can find all of the local minima for a plot of y vs. x without having to manually fit a function and find where the derivatives are zero?
0 comentarios
Respuestas (2)
Walter Roberson
el 1 de Abr. de 2011
You should probably think more about what you mean by a "local minima".
If a curve is curling clockwise, the (x2,y2) could be said to be a local minima on the curve if it is on the "right hand side" of the vector connecting (x1,y1) and (x3,y3). I suspect, though, that this will find more points than you wish found.
If the points were subject to noise then you may wish to apply some smoothing before you do the testing. Unfortunately I don't think I know at the moment what the two-dimensional equivalent of traditional smoothing algorithms such as "moving average" are.
The situation is easier if the curve has monotonic x or y (or both)
0 comentarios
Paulo Silva
el 1 de Abr. de 2011
[C,I] = min(y) %C is the value and I is the index
x(I) %gives the x value of the local minima
0 comentarios
Ver también
Categorías
Más información sobre Smoothing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!