Can you solve 1a but NOT allowed to use fft function already built in matlab 1.
ID: 2084976 • Letter: C
Question
Can you solve 1a but NOT allowed to use fft function already built in matlab
1. For each of the finite-length signals below I, n=0 1, x2 [n] = 1, n = 2 1,n=3 1,n=4 0, else 0, else a) Compute the N-point DFT, directly from the transform equation, for N = 32, 64, 128, 256, Recall that for N > L (were L is the length of the non-zero extent of the signal), you need to use zero padding to achieve the desired N. Compute and plot the magnitudes of the four transforms, Xv [k]|, above using the stem function. Include all four plots in the same figure using the subplot function. Use appropriate labels for your plots b) What is the expression for the DTFT, X(e), of the signal? Find it by hand via the transform equation or by tables of basic transforms and properties. Next, compute the magnitude of the signal's DTFT, Keju). for -27/32 and = 9% what value of k do these frequencies correspond to in each of the N-point DFTs from a)? Do the values for the DFTs and DTFT align as you expect them to? ExplairnExplanation / Answer
%for N=32
x=[1,2,3,zeros(1,29)];
N=length(x);
X1 = zeros(1,N);
power = (-2*pi*j/N)*(0:N-1);
for k = 1:N % N/2-1
X1(k) = x* exp((k-1)*power');
end
subplot(3,2,1);
stem(abs(X1))
%for N=64
x=[1,2,3,zeros(1,61)];
N=length(x);
X2 = zeros(1,N);
power = (-2*pi*j/N)*(0:N-1);
for k = 1:N % N/2-1
X2(k) = x* exp((k-1)*power');
end
subplot(3,2,2);
stem(abs(X2))
%For N=128
x=[1,2,3,zeros(1,125)];
N=length(x);
X3 = zeros(1,N);
power = (-2*pi*j/N)*(0:N-1);
for k = 1:N % N/2-1
X3(k) = x* exp((k-1)*power');
end
subplot(3,2,3);
stem(abs(X3))
%for N=256
x=[1,2,3,zeros(1,253)];
N=length(x);
X4 = zeros(1,N);
power = (-2*pi*j/N)*(0:N-1);
for k = 1:N % N/2-1
X4(k) = x* exp((k-1)*power');
end
subplot(3,2,4);
stem(abs(X4))
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.