Finding the second peak
Finding the second peak
(OP)
Hi
I am facing a trouble in locating the second maximum peak in FFT spectrum. I used the following to find the maximum peak but was not able to find the second peak..
X = abs(fft(Ei));
X = fftshift(X);
Peak = find(X == max(X));
Any help is appreciated !!!
I am facing a trouble in locating the second maximum peak in FFT spectrum. I used the following to find the maximum peak but was not able to find the second peak..
X = abs(fft(Ei));
X = fftshift(X);
Peak = find(X == max(X));
Any help is appreciated !!!





RE: Finding the second peak
[Xs,idx]=sort(X);
Peak1 = idx(1)
Peak2 = idx(2)