MATLAB CODING Say I had a signal = T and I computed the the fourier transform so X = fft(T) and I computed a suitable frequency vector k = linspace(-fs/2,fs/2,length(X)+1) k = k(1:end-1) I need to find the peaks in the magnitude spectrum (which in this case occur over values of 1) and from them find the corresponding amplitude and angle to these peaks. I\'m assuming it would go something like [peaks,locs] = findpeaks(abs(X)./fs,k,\'MinPeakHeight\',1) amplitude = X(locs) phase = angle(X(locs)) Any advice would be great Solution %MATLAB Code begins %Vector T contains the input signal which is to be analyzed and fs is the sampling frequency y = fft(t); %computing the Fast Fourier Transform l = length(T); %storing the length of input signal f = fs * (0:l-1) / l; %defining the frequency domain of the Fourier Transform [pks,locs] = findpeaks(y,\'MinPeakHeight\',1); %finding the peaks and their locations in the Fourier Transform abs(y(locs)) %displaying the amplitude of peaks angle(y(locs)) %displaying the angle of peaks f(locs) %displaying the frequencies corresponding to which the peaks occur %MATLAB Code ends.