Finding the max value in 1st column of values based on a range in the 2nd column of values
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Austin Bollinger
am 30 Jun. 2022
Beantwortet: David Hill
am 30 Jun. 2022
I am looking at an FFT graph and trying to output the max amplitude values between the frequency range of 0.09:0.11,0.19:0.21, and 0.24:0.26. I have a two column matrix. The first column is amplitude values and the second column is frequency values.
0 Kommentare
Akzeptierte Antwort
David Hill
am 30 Jun. 2022
idx=(FFTDataCKASRoll(:,2)>=.09&FFTDataCKASRoll(:,2)<=.11)|...
(FFTDataCKASRoll(:,2)>=.19&FFTDataCKASRoll(:,2)<=.21)|...
(FFTDataCKASRoll(:,2)>=.24&FFTDataCKASRoll(:,2)<=.26);
m=max(FFTDataCKASRoll(idx,1));
0 Kommentare
Weitere Antworten (1)
Jonas
am 30 Jun. 2022
max(yourMat( yourMat(:,2)>0.09 && yourMat(:,2)<0.11 ,1))
for the first range and so on?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!