Hi, i'm trying to use the findpeaks function to find my highest two values in my spectrum, but I can't figure out how to get the findpeaks functions to only show me the highest 2 peaks. What else do I need in my findpeaks function to get what I want?
code
close all;
clear all;
[y,Fs]=audioread('doorbell.wav');%reading audio file
y=y';
y_spectrum=pwelch(y);
sound(y_spectrum);%playing the spectrum using sound function
[pks lcs]=findpeaks(y_spectrum)
Best Answer