A part of my work need me to peak the peak from a graph of cyclic nature with time vs velocity. I tried to use treshold and and others options. to locate the maximum peak but could also include the local maximums . Is there anyway of picking the maximum value? such as sliding window ?

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 3 日

0 投票

Use findpeaks function

2 件のコメント

Ede gerlderlands
Ede gerlderlands 2013 年 4 月 3 日
I did use that and it also includes the local maximums which are not my needs.
Image Analyst
Image Analyst 2013 年 4 月 4 日
編集済み: Image Analyst 2013 年 4 月 4 日
But you accepted this answer?

サインインしてコメントする。

その他の回答 (3 件)

Image Analyst
Image Analyst 2013 年 4 月 3 日

0 投票

For local peaks I'd use findpeaks() in the Signal Processing Toolbox, or imregionalmax() in the Image Processing Toolbox. For a global peak, simply use the max function
[maxValue, indexOfMax] = max(yourSignal);

4 件のコメント

Ede gerlderlands
Ede gerlderlands 2013 年 4 月 3 日
This gives me the global max and is single value. My graph has a cyclic characteristics with many peaks and troughs. What I want is those peaks excluding the local maximums . If I explained it correctly. Tnx
Image Analyst
Image Analyst 2013 年 4 月 4 日
Well now I have no idea if you want all the local peaks or not. How many peaks do you want? One or multiple? I think it's time for you to post an image of your data with arrows pointing to the peak(s) on the signal that you want to detect. Try http://snag.gy or http://tinypic.com.
Ede gerlderlands
Ede gerlderlands 2013 年 4 月 4 日
Ok thank you I have already done it with your above answer
Image Analyst
Image Analyst 2013 年 4 月 4 日
You're welcome. Glad I could help.

サインインしてコメントする。

pramod kumar
pramod kumar 2013 年 4 月 4 日

0 投票

even i am also working on to find the peak of the signal i have tried inbuilt function [peak_value, peak_location] = findpeaks(Tx1Rx_1100mm_3plates);

1 件のコメント

Image Analyst
Image Analyst 2013 年 4 月 4 日
After reading this: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer, post your own question, along with screenshot of your signal, and code (including data) that we can copy and paste to reproduce your situation.

サインインしてコメントする。

Chinnaiah Golla
Chinnaiah Golla 2014 年 11 月 5 日

0 投票

If you simply want to obtain the maximum(Peak) value of signal by excluding the local maximas, you can use the max function.
max_val=max(signal);

Community Treasure Hunt

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

Start Hunting!

Translated by