Question

In: Electrical Engineering

given the sequences  x1 = [2, 6, -4, 1] x2 = [8, 0, 2, 0, -9,...

given the sequences 
x1 = [2, 6, -4, 1]
x2 = [8, 0, 2, 0, -9, 0, 1, 0]
x3 = [2, 0, -8, -8, 2]
x4 = [0, 1, 5i, 0, 6i, 0]
x5 = [9, 3, 7]
plot the
1. DFT magnitude of the computed sequences in MATLAB 
2. phase responses in degrees and radians against frequency and number of samples
3. comment on the plots

Solutions

Expert Solution

clc;
close all; clear

x1 = [2 6 -4 1];
x2 = [8 0 2 0 -9 0 1 0];
x3 = [2 0 -8 -8 2];
x4 = [0 1 5i 0 6i 0];
x5 = [9 3 7];


y1 = fft(x1); % Compute DFT of x
y2 = fft(x2);
y3 = fft(x3);
y4 = fft(x4);
y5 = fft(x5);

m1 = abs(y1); % Magnitude
m2 = abs(y2);
m3 = abs(y3);
m4 = abs(y4);
m5 = abs(y5);

p1 = unwrap(angle(y1)); % phase
p2 = unwrap(angle(y2));
p3 = unwrap(angle(y3));
p4 = unwrap(angle(y4));
p5 = unwrap(angle(y5));

f1 = (0:length(y1)-1)*100/length(y1); % Frequency vector
f2 = (0:length(y2)-1)*100/length(y2);
f3 = (0:length(y3)-1)*100/length(y3);
f4 = (0:length(y4)-1)*100/length(y4);
f5 = (0:length(y5)-1)*100/length(y5);

figure
subplot(3,1,1)
plot(f1,m1)
title('Magnitude x1')
subplot(3,1,2)
plot(f1,p1*180/pi)
title('Phase degree x1')
subplot(3,1,3)
plot(f1,p1*180/pi)
title('Phase radian x1')

figure
subplot(3,1,1)
plot(f2,m2)
title('Magnitude x2')
subplot(3,1,2)
plot(f2,p2*180/pi)
title('Phase degree x2')
subplot(3,1,3)
plot(f1,p1)
title('Phase radian x2')


figure
subplot(3,1,1)
plot(f3,m3)
title('Magnitude x3')
subplot(3,1,2)
plot(f3,p3*180/pi)
title('Phase degree x3')
subplot(3,1,3)
plot(f1,p1)
title('Phase radian x3')

figure
subplot(3,1,1)
plot(f4,m4)
title('Magnitude x4')
subplot(3,1,2)
plot(f4,p4*180/pi)
title('Phase degree x4')
subplot(3,1,3)
plot(f1,p1)
title('Phase radian x4')


figure
subplot(3,1,1)
plot(f5,m5)
title('Magnitude x5')
subplot(3,1,2)
plot(f5,p5*180/pi)
title('Phase degree x5')
subplot(3,1,3)
plot(f1,p1)
title('Phase radian x5')


Related Solutions

DATA 2 ID X1 X2 X3 Y A 0 2 4 9 B 1 0 8...
DATA 2 ID X1 X2 X3 Y A 0 2 4 9 B 1 0 8 10 C 0 1 0 5 D 1 1 0 1 E 0 0 8 10 CORRELATION MATRIX Y X1 X2 X3 Y 1 ? -0.304 +0.889 X1 ? 1 -0.327 0 X2 -0.304 -0.327 1 -0.598 X3 +0.889 0 -0.598 1 1. What is the sum of squares regression for the full model? (Correct answer is 58, please show me how to get...
DATA 2 ID X1 X2 X3 Y A 0 2 4 9 B 1 0 8...
DATA 2 ID X1 X2 X3 Y A 0 2 4 9 B 1 0 8 10 C 0 1 0 5 D 1 1 0 1 E 0 0 8 10 CORRELATION MATRIX Y X1 X2 X3 Y 1 ? -0.304 +0.889 X1 ? 1 -0.327 0 X2 -0.304 -0.327 1 -0.598 X3 +0.889 0 -0.598 1 Comparing the zero order model and full model 1. Did the addition of X2 and X3 significantly increase R2? (correct answer is...
Sophie's utility function is given as U = 2(x1)^(1/2) + 8(x2) where x1 and x2 represent...
Sophie's utility function is given as U = 2(x1)^(1/2) + 8(x2) where x1 and x2 represent the two goods Sophie consumes. Sophie's income is $3400 and the prices are given as x1 = $2 and x2 = $160 a) derive & represent in two separate diagrams the demand for x1 and x2 ( for any income and prices) b) If Sophie's income is increased to $6600, what is the income effect on x1? Is x2 a normal good? Justify your...
Let X1 and X2 have the joint pdf f(x1,x2) = 2 0<x1<x2<1; 0.  elsewhere (a) Find the...
Let X1 and X2 have the joint pdf f(x1,x2) = 2 0<x1<x2<1; 0.  elsewhere (a) Find the conditional densities (pdf) of X1|X2 = x2 and X2|X1 = x1. (b) Find the conditional expectation and variance of X1|X2 = x2 and X2|X1 = x1. (c) Compare the probabilities P(0 < X1 < 1/2|X2 = 3/4) and P(0 < X1 < 1/2). (d) Suppose that Y = E(X2|X1). Verify that E(Y ) = E(X2), and that var(Y ) ≤ var(X2).
4.Maximize: Z = 2X1+ X2-3X3 Subject to: 2X1+ X2= 14 X1+ X2+ X3≥6 X1, X2, X3≥0...
4.Maximize: Z = 2X1+ X2-3X3 Subject to: 2X1+ X2= 14 X1+ X2+ X3≥6 X1, X2, X3≥0 Solve the problem by using the M-technique.
1: Given that f(4) = 6 and f'(x) = 2/x2+9 for all x. a) Use a...
1: Given that f(4) = 6 and f'(x) = 2/x2+9 for all x. a) Use a linear approximation or differentials to estimate f(4.04) b) Is your estimate in part (a) too large or too small? Explain. 2: a) Given f(x) = (x + 3)sinx, find f'(π) using logarithmic differentiation. b) Find the value of h'(0) if h(x)+xsin(h(x))= x2+4x-π/2
Find the probability P(0<X1<1/3 , 0<X2<1/3) where X1, X2 have the joint pdf                    f(x1, x2)...
Find the probability P(0<X1<1/3 , 0<X2<1/3) where X1, X2 have the joint pdf                    f(x1, x2) = 4x1(1-x2) ,     0<x1<1 0<x2<1                                       0,                  otherwise (ii) For the same joint pdf, calculate E(X1X2) and E(X1 + X2) (iii) Calculate Var(X1X2)
A=[ 7 8 -2 -6 7 4 1 ; 2 4 -4 -13 9 9 -12...
A=[ 7 8 -2 -6 7 4 1 ; 2 4 -4 -13 9 9 -12 ; 6 6 0 -9 8 9 -4 ; 1 8 -14 -22 5 8 -1 ; 4 9 -10 -14 7 4 -1] B=[ 19 4 4 14 -3 -7 -5 ; 21 -6 -5 10 14 -2 4 ; 22 -4 5 13 5 -6 4 ; 41 20 0 26 11 -1 -27 ; 29 14 -2 20 3 -4 -19]...
Find dual from primal conversion MIN Z = x1 - 2x2 subject to 4x1 - x2 >= 8 2x1 + x2 >= 10 -x1 + x2 <= 7 and x1,x2 >= 0
Find dual from primal conversion MIN Z = x1 - 2x2 subject to 4x1 - x2 >= 8 2x1 + x2 >= 10 -x1 + x2 = 0
Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,...
Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. How many hexadecimal strings of length twelve have five A’s and five B’s? How many hexadecimal strings of length twelve have at most three E’s? How many hexadecimal strings of length twelve have exactly three A’s and at least two B’s? How many hexadecimal strings of length twelve have exactly two A’s and exactly two B’s, so that the two...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT