How to find time at maximum amplitude in a signal

I have single variable(wave) x(time,volt). There are multiple wavelets (3 to 6) in the signal x. I want to find value of time (x axis) for maximum value of volt (y axis) in each wavelets. Goal is to find the difference in terms of time at positve peak of voltage - between wavelets in a single wave.
time (s) - voltage(v) 0 0 1 2 2 3 3 2 4 -2 5 -3 6 -2 7 0 8 2 9 5 10 7 11 3 12 -3 13 -6 14 -2 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 2 28 3 29 2 30 -2 31 -3 32 -2 33 0 34 2 35 5 36 10 37 3 38 -3 39 -6 40 -2

1 commentaire

Jan
Jan le 3 Mar 2011
It is not getting clear to me. Please omit all unnecessary information like the physical meaning of the data - calculating the max of temperature or money is exactly the same in a program. Especially I do not get the dimension of your data array "variable(wave) x(time,volt)" - is it a vector?

Connectez-vous pour commenter.

Réponses (1)

maxvol=max(x(:,2))
timemaxvol=x((find(x(:,2)==maxvol)),1)

2 commentaires

Jan
Jan le 3 Mar 2011
You can omit the FIND te use the faster logical indexing.
Paulo, the requirement is to find the maximum value for each of the 3 to 6 wavelets. If I recall correctly, wavelets are not confined to having a single peak, so even a peak-finding function would not be suitable here. I believe one would have to do a wavelet analysis using the same kind of wavelets that were used in the construction of the signal.

Connectez-vous pour commenter.

Catégories

Question posée :

le 3 Mar 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by