Question

MATLAB CODE IS REQUIRED** Let x[n] = n(0.9)nu[n]. (a) Determine the DTFT X ̃ (ejω) of...

MATLAB CODE IS REQUIRED**

Let x[n] = n(0.9)nu[n].

(a) Determine the DTFT X ̃ (e) of x[n].

(b) Choose first N = 20 samples of x[n] and compute the approximate DTFT X ̃N(e) using the fft function. Plot magnitudes of X ̃(e) and X ̃N(e) in one plot and compare your results.

(c) Repeat part (b) using N = 50.

(d) Repeat part (b) using N = 100.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a)

MATLAB CODE :

clc
clear all
close all

syms n w
u(n) = heaviside(n) ;      % Unit step signal
x(n) = n*(0.9^n)*u(n) ;    % Given x[n]
X(w) = symsum(x(n)*exp(-1i*w*n),n,-inf,inf) ; % DTFT of x[n]

fplot(w,abs(X(w)))
xlabel('w')
ylabel('|X(e^{jw})|')
title('Magnitude using DTFT')
grid on

OUTPUT :

Magnitude using DTFT X(el) -5 -4 -3 -2 - 1 1 2 3 4 5

(b)

MATLAB CODE :

clc
clear all
close all

N = 20 ;            % Given N value
n = 0:N-1 ;
u = n >= 0 ;        % Unit Step sequence
x = n.*(0.9.^n).*u; % x[n]
X = fft(x) ;        % FFT of x[n]

plot(abs(X))
title('Magnitude using FFT for N = 20')
grid on

OUTPUT :

Magnitude using FFT for N = 20 0 2 4 6 8 10 12 14 16 18 20

(c)

MATLAB CODE :

clc
clear all
close all

N = 50 ;            % Given N value
n = 0:N-1 ;
u = n >= 0 ;        % Unit Step sequence
x = n.*(0.9.^n).*u; % x[n]
X = fft(x) ;        % FFT of x[n]

plot(abs(X))
title('Magnitude using FFT for N = 50')
grid on

OUTPUT :

Magnitude using FFT for N = 50 201 0 5 10 15 20 25 30 35 40 45 50

(d)

MATLAB CODE :

clc
clear all
close all

N = 100 ;            % Given N value
n = 0:N-1 ;
u = n >= 0 ;        % Unit Step sequence
x = n.*(0.9.^n).*u; % x[n]
X = fft(x) ;        % FFT of x[n]

plot(abs(X))
title('Magnitude using FFT for N = 100')
grid on

OUTPUT :

Magnitude using FFT for N = 100 90 80 0 10 20 30 40 50 60 70 80 90 100

Add a comment
Know the answer?
Add Answer to:
MATLAB CODE IS REQUIRED** Let x[n] = n(0.9)nu[n]. (a) Determine the DTFT X ̃ (ejω) of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT