Borrar filtros
Borrar filtros

compensate for this for a correct recovery of the time domain signal

2 visualizaciones (últimos 30 días)
% 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

Respuestas (0)

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by