compensate for this for a correct recovery of the time domain signal
조회 수: 2 (최근 30일)
이전 댓글 표시
% IFFT
%
% Load the sample waveform
Fs = 44100; % sampling frequency
y = audioread('guitartune.wav');
dt = 1/Fs; % sampling interval
N = length(y);
time = (0:1:(N-1))*dt;
% Calculate the frequency domain signal
df = 1/(N*dt); % frequency increment
Nyq = 1/(dt*2); % Nyquist Frequency
freq = -Nyq:df:Nyq-df; % frequency axis
y_fft = fftshift( fft(y) );
% Recover the time domain signal by using ifft
y_recovered = ifft(y_fft);
% Plot both the time domain and frequency domain signals
figure (3);
subplot(2, 1, 1)
plot(time, y)
xlabel(time (s)')
subplot(2, 1, 2)
plot(time, y_recovered)
xlabel(time (s)')
How does the time domain signal look? Is it the same as the original signal? Zoom in to the first 0.1 second and show that if both signals are the same or not. After calculating the fft, code performs a fftshift operation to estimate the spectrum y_fft. Before the inverse transform, you need to compensate for this for a correct recovery of the time domain signal? I need help to compensate the signal
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!