Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write MATLAB programs for the following problems. Include your programs as well

ID: 2292289 • Letter: W

Question

Write MATLAB programs for the following problems. Include your programs as well as relevant numbers and figures 1. Write a function to determine the DTFT (H(o x(n)- (4, 3, 2, 1, 2, 3, 4) Use the following function, dft )of the following sequence: dtft.m function [X] -dtft(x, n, w) X x"exp (-j * n, *w) ; Plot its magnitude and phase. Use the abs, angle and plot commands to plot the results. 2. Find H(z) analytically. Using freqz, plot its magnitude and phase for the following system: y(n) -2x(n)+x(n- 1) 0.25y(n 1+0.25y(n - 2) 3. With fvtool, one can see the magnitude and phase response of H(o), the zero- pole locations, impulse response, and stability of the system, among other things Plot the following with fvtool: a) Assume that H(z) has a pole at z- 0.7 and a zero at z-a. Plot the magnitude and phase response of H( for all the following cases: a-3,1,-0.5, 0.65, 0.7,0.8,1, 1.5,3 This will show the how the location of the zero effects the frequency response. Explain your observations. b) Assume H(z) has zeros at e and e and two poles, both at z-c.Find H(z) and use MATLAB to show the changes in H( for c 0.9,-0.2,0.2, 0.7, 0.95. Also show the zero-pole plot for each case and explain the effect that the location of the poles have on the filter type

Explanation / Answer

Hello,
          Please find the answer to the first question attached as under. Please give a thumbs up rating if you find the answer useful! Have a rocking day ahead!

********* Matlab Code **********

Function definition:

function [X] = dtft(x,n,w)


X = zeros(1,length(w));

for cc = 1:length(w)
      X(cc) = sum(x.*exp(-1i*w(cc)*n));
end
end

The main file:

x = [4 3 2 1 2 3 4];
n = 1:7;
w = 0:pi/10:2*pi;
X = dtft(x,n,w);

********* Output *******

X =

19.0000 + 0.0000i  

4.4377 -13.6578i

-2.9271 - 2.1266i  

4.9442 - 3.5922i

-2.8090 - 8.6453i
  
-5.0000 - 0.0000i  

0.4271 - 1.3143i

-3.5623 - 2.5881i

-1.6910 + 1.2286i

-0.8196 - 2.5226i

-5.0000 - 0.0000i

-0.8196 + 2.5226i

-1.6910 - 1.2286i

-3.5623 + 2.5881i  

0.4271 + 1.3143i

-5.0000 - 0.0000i

-2.8090 + 8.6453i  

4.9442 + 3.5922i

-2.9271 + 2.1266i  

4.4377 +13.6578i

19.0000 + 0.0000i

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote