Finding Maximum Value In Array
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
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.
0 个评论
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!