Please solve p1 of this question which also includes the matlab code by using the functions for matlab that i already have given in the images i provided thank you

Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:Robert L. Boylestad
Chapter1: Introduction
Section: Chapter Questions
Problem 1P: Visit your local library (at school or home) and describe the extent to which it provides literature...
icon
Related questions
Question

Please solve p1 of this question which also includes the matlab code by using the functions for matlab that i already have given in the images i provided thank you

Mfile:
function [Xk] = dft(xn,N)
& Computes Discrete Fourier Transform
[Xk] = dft (xn, N)
% Xk = DFT coeff. array over 0 <= k <= N-1
=
% xn N-point finite-duration sequence
n =
=
N Length of DFT
[0:1:N-1];
k = [0:1:N-1];
WN = exp(-j*2*pi/N);
nk = n'*k;
WNnk
=
Xk = xn
WN.nk;
* WNnk;
row vector for n
row vecor for k
% Wn factor
%creates a N by N matrix of nk values
% DFT matrix
row vector for DFT coefficients
Mfile:
function [xn] = idft (Xk, N)
8
Computes Inverse Discrete Transform
% [xn]
% xn=
ge
=
=
idft (Xk,N)
N-point sequence over 0 <= n <= N-1
Xk DFT coeff. array over 0 <= k <= N-1
N = length of DFT
n = [0:1:N-1];
k = [0:1:N-1];
WN = exp(-j*2*pi/N);
nk=n'*k;
WNnk
WN.^(-nk);
xn = (Xk * WNnk) /N;
row vector for n
&row vecor for k
% Wn factor
% creates a N by N matrix of nk values
* IDFT matrix
row vector for IDFT values
Transcribed Image Text:Mfile: function [Xk] = dft(xn,N) & Computes Discrete Fourier Transform [Xk] = dft (xn, N) % Xk = DFT coeff. array over 0 <= k <= N-1 = % xn N-point finite-duration sequence n = = N Length of DFT [0:1:N-1]; k = [0:1:N-1]; WN = exp(-j*2*pi/N); nk = n'*k; WNnk = Xk = xn WN.nk; * WNnk; row vector for n row vecor for k % Wn factor %creates a N by N matrix of nk values % DFT matrix row vector for DFT coefficients Mfile: function [xn] = idft (Xk, N) 8 Computes Inverse Discrete Transform % [xn] % xn= ge = = idft (Xk,N) N-point sequence over 0 <= n <= N-1 Xk DFT coeff. array over 0 <= k <= N-1 N = length of DFT n = [0:1:N-1]; k = [0:1:N-1]; WN = exp(-j*2*pi/N); nk=n'*k; WNnk WN.^(-nk); xn = (Xk * WNnk) /N; row vector for n &row vecor for k % Wn factor % creates a N by N matrix of nk values * IDFT matrix row vector for IDFT values
P1) Let x1(n) = {1,2,2, 1}. A new sequence x2(n) is formed using
x₁(n), 0<n<3;
x2(n) = x(n4), 4 < n < 7;
0, otherwise.
1. Express X2 (ej) in terms of X₁ (el) without explicitly computing X₁ (ej).
2. Verify your result using MATLAB by computing and plotting the magnitudes of the
respective DTFTs.
P2) Use the DTFT function to compute the DTFT X(ei) of the following finite-duration
sequences
over →≤≤л. Plot DTFT magnitude and angle graphs in one figure window.
1. x(n) = {4,3,2,1, 1, 2, 3, 4}. Comment on the angle plot.
2. x(n) = {4,3,2, 1, −1, −2, -3, -4}. Comment on the angle plot.
DTFT function
function [X] = dtft(x,n,w)
X = x*exp(-j*n**w);
end
Transcribed Image Text:P1) Let x1(n) = {1,2,2, 1}. A new sequence x2(n) is formed using x₁(n), 0<n<3; x2(n) = x(n4), 4 < n < 7; 0, otherwise. 1. Express X2 (ej) in terms of X₁ (el) without explicitly computing X₁ (ej). 2. Verify your result using MATLAB by computing and plotting the magnitudes of the respective DTFTs. P2) Use the DTFT function to compute the DTFT X(ei) of the following finite-duration sequences over →≤≤л. Plot DTFT magnitude and angle graphs in one figure window. 1. x(n) = {4,3,2,1, 1, 2, 3, 4}. Comment on the angle plot. 2. x(n) = {4,3,2, 1, −1, −2, -3, -4}. Comment on the angle plot. DTFT function function [X] = dtft(x,n,w) X = x*exp(-j*n**w); end
Expert Solution
steps

Step by step

Solved in 4 steps with 8 images

Blurred answer
Knowledge Booster
State Diagram and Its Designing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Introductory Circuit Analysis (13th Edition)
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:
9780133923605
Author:
Robert L. Boylestad
Publisher:
PEARSON
Delmar's Standard Textbook Of Electricity
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Electrical Engineering
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education
Fundamentals of Electric Circuits
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:
9780078028229
Author:
Charles K Alexander, Matthew Sadiku
Publisher:
McGraw-Hill Education
Electric Circuits. (11th Edition)
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:
9780134746968
Author:
James W. Nilsson, Susan Riedel
Publisher:
PEARSON
Engineering Electromagnetics
Engineering Electromagnetics
Electrical Engineering
ISBN:
9780078028151
Author:
Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:
Mcgraw-hill Education,