MATLAB CODE IS REQUIRED**
Let x[n] = n(0.9)nu[n].
(a) Determine the DTFT X ̃ (ejω) of x[n].
(b) Choose first N = 20 samples of x[n] and compute the approximate DTFT X ̃N(ejω) using the fft function. Plot magnitudes of X ̃(ejω) and X ̃N(ejω) in one plot and compare your results.
(c) Repeat part (b) using N = 50.
(d) Repeat part (b) using N = 100.
(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 :
(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 :
(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 :
(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 :
MATLAB CODE IS REQUIRED** Let x[n] = n(0.9)nu[n]. (a) Determine the DTFT X ̃ (ejω) of...
using MATLAB
Q5. Let x(n) = T(n) be the next function: T(n) = [0.5 +0.5cos(in/N)] Where N = 50 and n = [0 : M]. Using the properties of the DTFT, determine and plot the DTFT (magnitude and phase normalized in w) of the following: 1. X(n) = T(-n). 2. X(n) = T(n) enten
Using MATLAB, Please read carefully, EXPLAIN CODE AND ANSWERS,
DISCUSS RESULTS, I NEED EVERY PART
(B) Implement Matlab code for each part as described below: i) Define the following signal in time and plot it where Ai 10, A2-3, fi-10 Hz, f2-40 Hz. part of the DFT, and discuss the results. zero. Do this carefully for both positive and negative frequencies. Call this signal G (f). ii) Compute the DFT S(f) of s (t) using the fft() function. Plot the...
Problem 4.1 Using the course Matlab dtft function compute the magnitude, and phase for the following discrete-time signal: a) x(n)=n(0.9)" [u(n)-u(n–21)] b) x(n) = cosTo» - 4 ][(n) – u (n – 40)]
This is a MATLAB Question. Below is my base code for a Fourier
Series of a half triangle wave.
So I am being asked to isolate the first 8 components so that
only those first 8 components of the half triangle function are
calculated by MATLAB fft function, and then afterwards I am asked
to do the same thing but with the first 20 components rather than
the first 8. How do I isolate the first x number of components...
for the plot, provide the matlab code.
3. Let the input signal x[n] (defined for -<n < oo) to the system be x[n] = 3 cos( 0.05πn) + 4 cos( 0.45πn) + cos( 0.95 n) and the transfer function be 1-re-je a) Plot this signal as a function of n. b) Determine and plot the output y[n] produced by the system due to the input analyzed in part a) of this problem. Do this first with r 0.05 and then...
MATLAB Code Question
alpha = 2.3
beta = 4.3
zeta = 9.1
PROBLEM 4 (20 points). Consider three sinusoids with the following amplitudes and phases a.cs(2n(500t)) β.cos(2n(500t) +0.5r) x1n] x2[n] rn = cos(2(500t)0.75) Create a MATLAB program to sample each sinusoid and generate a sum of three sinusoids, that is using a sampling rate of 8,000 Hz over a range of 0.1 seconds Use the MATLAB function stem) to plot r[n] for the first 20 samples Use the MATLAB function...
Lab #2 Discrete-time Fourier Transform (DTFT) OBJECTIVES: • Explore the DTFT, its meanings and concepts. • Get acquainted with Matlab/Octave 1) Start MATLAB and change the “Current Directory” in the top of the window (or type) >> cd '' (example: >> cd 'C:\NIU\lab2') Alternatively, if you don't want to use MATLAB, you can open a web-browser and go to “octave-online.net”. 2) Download and execute LAB2forStudent_A.M with >> lab2forStudent_A and observe that it produces a Discrete-Time (DT) signal xVec. 3) TO...
Please show all matlab code inputs if possible, please and thank
you
3. Let x (n) = {1,-2,4,6, 5,8,10]. Generate and plot the samples of the following sequence (4 points) a) x1 (n) = 3x (n + 2) + x(n-4)-2x (n)
A causal discrete-time system is described by the following difference equation: Use Matlab to write a script to complete the following tasks. Turn in the output created by the Matlab "publish" utility. (a) Compute and plot the impulse response h[n], 0くn 〈 50. Use the function h=imp2(b, a , N ) to find the impulse response, and use the stem ) function to create the plot. (b) Let x[n] be defined by (n - 15)2 0n K 30 x[n] elsewhere...
Using the course Matlab dtft function compute the magnitude, and phase for the following discrete-time signal а) x(п) -п(09)[«(п)-и (п-21)] F [(a) -и (п- 40)] b) x (п) - =coS n 10 4 u --
Using the course Matlab dtft function compute the magnitude, and phase for the following discrete-time signal а) x(п) -п(09)[«(п)-и (п-21)] F [(a) -и (п- 40)] b) x (п) - =coS n 10 4 u --