Finding Maximum Value In Array

2 ビュー (過去 30 日間)
Chris Corbett
Chris Corbett 2013 年 3 月 18 日
Hi, I have an array where the first row is data, and the second row is frequency, I also have a graph of this data versus frequency. I want to find the maximum values of this data, as it spikes at certain frequencies, and the frequency associated with these maximums. I can't work out how to do it at all. a is the data. NEWF is the frequency.
array = [a;NEWF]
Any advice?
Thanks, Chris.

回答 (2 件)

Sean de Wolski
Sean de Wolski 2013 年 3 月 18 日
編集済み: Sean de Wolski 2013 年 3 月 18 日
doc max
Look at both output arguments. The second one, index, will tell you where to grab from.

Image Analyst
Image Analyst 2013 年 3 月 18 日
If you have multiple peaks, try findpeaks() in the Signal Processing Toolbox, or imregionalmax() in the Image Processing Toolbox. If you don't have either toolbox, check the File Exchange.

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by