Say I have performed FFT on a set of data and i have the frequency and amplitude values. I want to find the highest amplitude in each FFT block. The I need to find the frequency and amplitude of the points that are atleast greater than 0.4 times the max amplitude and save them in an array.. How can i do this?? I tried the following method by I keep getting an empty matrix....
% the code after FFT
peak_points = [];
fmin = 60;
fmax = 1000;
region_of_interest = fmax>f & f>fmin;
froi = f(region_of_interest);
[p_max,loc] = max(seg_fft2(region_of_interest));
p_max;
fpeaks = froi(loc);
[points, locatn] = findpeaks(seg_fft2(region_of_interest));
if points > 0.4*p_max
peak_points = [peak_points ; points locatn]
end
Im bad with arrays.. So I cant seem to figure this out. Would appreciate someone's help in this... Thanks in advance...