number of local maxima with specific condition

10 ビュー (過去 30 日間)
navan
navan 2015 年 5 月 27 日
コメント済み: Image Analyst 2015 年 5 月 27 日
I want to find out a)the local maximas of each rows in a matrix b)the number of such maxima in each row.
with specific conditions 1)The difference between the local maxima and minimum value of each row should be >1000 (ie. local maxima-minvalue>1000)
A=[1000 1500 2000 2500 4000 3500 2000 1000, 1000 1500 4000 2500 1000 4500 2000 1000, 1000 1500 1800 1500 1400 1300 1200 1000, 1000 2400 2000 2500 3000 2500 3500 1000,
The answer i expect, peak values in each row= [3000, 4000 4500,1800, 2400 3000 3500[ minimum values in each row=[1000,1000,1000,1000] No of peaks value obey conditions(>1000 difference)=[1,2,0,3]

回答 (1 件)

Image Analyst
Image Analyst 2015 年 5 月 27 日
Use findpeaks() if you have the Signal Processing Toolbox, or imregionalmax() if you have the Image Processing Toolbox.
  2 件のコメント
navan
navan 2015 年 5 月 27 日
Dear image analyst, Thanks for your answer. I have used findpeaks(),but problem was with the conditions.how will i write the code using the condition i specified above. (i.e, difference b/w peaks and min >1000,no of peaks in each row)
Image Analyst
Image Analyst 2015 年 5 月 27 日
Did you see the options, like "peak prominence"? Let's see your code with those options in there and show me what's not working.

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

カテゴリ

Help Center および File ExchangeSignal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by