As discussed in class, the FFT matrix has a nice inverse, so we can easily calcu
ID: 3574078 • Letter: A
Question
As discussed in class, the FFT matrix has a nice inverse, so we can easily calculate the inverse FFT to take the coefficients back to a time domain signal. We can also go into the frequency domain and filter out any unwanted sounds before using the ifft to bring back to the time domain. Try this on the sum of xx1 and xx2: (a) zz = xx1 + xx2; Then take the FFT: (b) fzz = fft(zz); Now look at the coefficients in the frequency domain and zero out the coefficients associated with the 5 period signal; cal this fzzfilt. Then take it back to the time domain with the ifft command: i. Do some stuff to zero out the right coefficient terms ii. zzfilt = ifft(fzzfilt);Explanation / Answer
clc;
clear all;
close all;
fs=1e6; % sampling frequency
fc=0.1e5; %carrier frequency
N=500; % number of samples
t=0:1/fs:(N-1)/fs; % time vector
xx1=sin(2*pi*fc*t); % single 1
xx2=cos(2*pi*fc*t); % signal 2
zz=xx1+xx2; % sum of signal1 and signal 2
fzz=fft(zz); % fft
fzzfilt=real(fzz); % imaginary term zero
zzfilt=ifft(fzzfilt);
output:
max(abs(imag(zzfilt)))
ans =
0
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.