Finding peaks in data based on certain threshold

1 回表示 (過去 30 日間)
Satej
Satej 2014 年 12 月 20 日
コメント済み: Joshua Briggs 2017 年 3 月 28 日
Hi I have an array [V Data] (Attached data file).The plot is shown below.
I want to detect the # of peaks (3 in this case) which are above a certain threshold (value is = 0.1) I also want to find the points where it crosses the threshold and extract respective values from V
Thanks SATEJ

採用された回答

Shoaibur Rahman
Shoaibur Rahman 2014 年 12 月 20 日
編集済み: Shoaibur Rahman 2014 年 12 月 20 日
Once I had to write a function for this type of problem in on of my projects. Seeing your question here, I have uploaded that file in file exchange:
Just use your +/-TestV as x, Data as y in the function, and threshold as 0.1. Ignore the outputs for minima.
By the way, if you have a closer look at your figure, there are two small peaks in 'left side', one big peak in 'middle', and one smaller peak at the 'right'. So, there will be 4 peaks in total instead of 3. Plot this data in Matlab, and enlarge the figure to verify this observation.
I guess, if you use the linked function findpeaks, the result will be 4 as well. You could also see the x coordinate at which peaks occur, and also the peak values at those points.
  1 件のコメント
Satej
Satej 2014 年 12 月 20 日
Thanks a lot. This helps Best regards SATEJ

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2014 年 12 月 20 日
Describe what "detect" means to you. Obviously you threshold:
abovePointOne = v > 0.1;
but then what? What kind of numbers do you want? The length of the stretches above 0.1? The starting points? The count of the number of stretches above 0.1? What????
  6 件のコメント
Satej
Satej 2014 年 12 月 22 日
Hi SS - Can you please post your code to the problem above. I thought I had accepted that answer. That code is very useful. Can you please repost it??? My sincere thanks for same
Best Satej
Joshua Briggs
Joshua Briggs 2017 年 3 月 28 日
Hi I am looking to do something similar to Satej, and IA's description of SS's code sounds like exactly what I need, just wondering if anyone has it, or if SS could please repost it.

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

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by