Label point on FFT plot
2 views (last 30 days)
I have a plot of an FFT of a signal, I did a findpeak to find the pronounced frequencies, and now I would like to add a label to the peaks.
Does anyone have a quick way of doing that based on my fft_pks, and fft_locs?
Thanks for the help.
[yfft_, freqvec_, yfft_dB_, freq_res] = calcFFT(step4, 'hamming', Fs*100, Fs);
[fft_pks fft_locs] = findpeaks(yfft_, 'MinPeakHeight', 0.4);
plot(freqvec_(fft_locs(2:3)), fft_pks(2:3), 'rx', "MarkerSize", 8, "linewidth", 2)