I have some data and it looks like Sawtooth wave and I have to find out the distance between two consecutive peaks and for this purpose, I am trying to calculate derivative and then finding out distance between two minimas. Please suggest, what should be the appropriate way to calculate the distance between consecutive peaks.
Asked
Active
Viewed 1,762 times
1
User1551892
- 125
- 1
- 7
-
I must be really stupid, but is the function pictured above discontinuous? :-) – Adam Nov 11 '13 at 17:06
-
@Adam: I do not think you are stupid. – Moishe Kohan Nov 11 '13 at 17:10
-
That´s nice to know. What do you think about the continuity of the function? – Adam Nov 11 '13 at 17:52
-
Is there a way to calculate the distance between two peaks instead calculating the derivative? – User1551892 Nov 11 '13 at 20:25
1 Answers
1
For a discontinuous function $ f(a)=>f(a+h) & f(a)=>f(a-h) $ ,then f(x) has maxima at x=a.
$ f(a)<=f(a+h) & f(a)<=f(a-h)$ ,then f(x) has minima at x=a .
Where h is a very small value and a is constant.
These are condition for maxima and minima in a discontinous function graph.
Neer
- 674
- 3
- 9
- 22
-
So you are basically saying that if you go from a point a little to the left or to the right and get smaller values you are looking at a maximum, right? That seems like a definition of a local maximum and it doesn´t seem to be valid only for discontinuous functions. – Adam Nov 11 '13 at 17:00
-
You can't differentiate if it is discontinous.But you can find the maxima and minima using these defintion :) I have added a picture to make myself more clear. – Neer Nov 11 '13 at 17:18
-
Could you suggest me any computation technique in Matlab for calculating it. – User1551892 Nov 11 '13 at 20:24