hi @ all,
somehow I don't get proper frequency, if I convert the samples to frequency.
The Data which are stored in the output vector were sampled with 320 MHz.
FS = 32000000; %Sample rate
NFFT = length(output); % Output= vector with samples
Y = fft(output,NFFT);
F = FS*(0:NFFT/2-1); % Convert x-axis samples to Frequency
magnitudeY = abs(Y); % Magnitude
dB_mag=mag2db(magnitudeY);
subplot(2,2,3);plot(F(1:NFFT/2),dB_mag(1:NFFT/2));title('Magnitude');
ylabel('Magnitude(dB)');

답변 (1개)

Star Strider
Star Strider 2021년 8월 23일

0 개 추천

Try this instead —
Y = fft(output,NFFT)/numel(output);
F = (FS/2)*(0:NFFT/2-1); % Convert x-axis samples to Frequency
Since you are calculating a one-sided fft, the highest uniquely identifiable frequency is the Nyquist frequency, one-half of the sampling frequency. It is also necessary to normalise the fft result by the length of the array being processed, then multiply that result by 2 (that I did not do here) to approximate the original signal amplitudes.
.

카테고리

제품

릴리스

R2019b

질문:

2021년 8월 23일

답변:

2021년 8월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by