Use MATLAB to generate a discrete-time signal of the form: x[n]=(0.5)^n u[n], n=
ID: 3777897 • Letter: U
Question
Use MATLAB to generate a discrete-time signal of the form: x[n]=(0.5)^n u[n], n=0,…,25
A) Plot x[n] and label figure as “Figure a”(hint: Use MATLAB function stem)
B) Plot the magnitude spectrum of the discrete time Fourier Transform of x[n] and label figure as “Figure b” (hint: Use FFT for the Fourier transform, and abs for the magnitude of the Fourier transform)
C) Plot the Phase spectrum of the discrete time Fourier Transform of x[n] and label figure as “Figure c” (hint: Use angle to find the phase of the Fourier transform)
Explanation / Answer
n = 0:1:25;
x = sqrt(n);
figure
plot(n, x);
title('Figure a');
fft_x = fft(x);
figure
plot(abs(fft_x));
title('Figure b');
figure
plot(angle(fft_x));
title('Figure c');
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.