Program:
clc;clear all;close all;
x=[1 2 1 0]
N=length(x)
n=0:1:N-1
k=0:1:N-1
%DFT
Xk=(exp(-j*2*pi*k'*n/N))*(x')
figure(1)
subplot(321)
stem(n,x)
xlabel('n')
ylabel('x(n)')
title('signal x(n)')
subplot(323)
stem(k,abs(Xk),'r')
xlabel('k')
ylabel('|Xk|')
title('DFT -|X(k)| ')
subplot(324)
stem(k,angle(Xk),'g')
xlabel('k')
ylabel('<Xk>')
title('Phase response of X(k) ')
F=fft(x,N)
subplot(325)
stem(k,abs(F),'r')
xlabel('k')
ylabel('|Fk|')
title('DFT from FFT -|F(k)| ')
subplot(326)
stem(k,angle(F),'g')
xlabel('k')
ylabel('<Fk>')
title('Phase response of F(k) ')
Command
window:
Xk =
4.00000 + 0.00000i
0.00000 - 2.00000i
0.00000 + 0.00000i
-0.00000 + 2.00000i
F =
4 + 0i 0 - 2i 0 + 0i 0 + 2i
Plot:

Problem 3 20 points Let f[n]- 1,2,1,0 Use MATLAB to compute the DFT F[k] and turn in the some com...
yin]-[x, -X]. Plot the magnitude of XIK] and YK] in Problem 1. Let x[n]=cos(2n/20*n)+randn( 1, 20) for n= 1:20 Matlab. x(k) is the fft of x zero padded to 40 data points. What is the relationship between X[k] and YK? data points. What is the relationship between XIK] and YIK]?
yin]-[x, -X]. Plot the magnitude of XIK] and YK] in Problem 1. Let x[n]=cos(2n/20*n)+randn( 1, 20) for n= 1:20 Matlab. x(k) is the fft of x zero padded to 40...
| The 8-point DFT of a sequence x[n] is X[k]=102-1047k, Osk57. Use the inverse DFT in MATLAB to find the sequence x[n]. Turn in a copy of your code and the output generated.
1. Let {X[k]}K=o be the N = 8-point DFT of the real-valued sequence x[n] = [1, 2, 3, 4]. (a) Let Y[k] = X[k]ejak + X[<k – 4 >8] be the N = 8-point DFT of a sequence y[n]. Compute y[n]. Note: Do NOT compute X[k]. (b) Let Y[k] = X*[k] be the DFT of the sequence y[n], where * denotes the conjugate. Compute the sequence y[n]. Note: Do NOT compute X[k].
Compute the FFT for x(n)-3, -2,-1,0,1,2,3,4], compute using 4-point DFT blocks and decimation in time method (all details are required) (2 points)
Can you help me to solve this problem
P5.30 Let X (k) be the 8-point DFT of a 3-point sequence x(n)- 15, -4,3). Let Y(k) be the 8-point DFT of a sequence y(n). Determine y(n) when Y (k) -Ws*X(-k)s.
P5.30 Let X (k) be the 8-point DFT of a 3-point sequence x(n)- 15, -4,3). Let Y(k) be the 8-point DFT of a sequence y(n). Determine y(n) when Y (k) -Ws*X(-k)s.
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...
In this question, the code is need to make dft at the first and then there are many requirmentsIdentification of pole positions in a system consider the system described by the difference equationy(n) = -r2y(n – 2) + x(n)(a) Let r = 0.9 and x(n) = ?(n). Generate the output sequence y(n) for 0 ? n ? 127.Compute the N = 128 point DFT {Y(k)} and {|Y(k)|}.(b) Compute the N = 128 point DFT of the sequence?(n) = (0.92)-ny(n)Where y(n)...
It is suggested that if you have an FFT subroutine for computing a length-N DFT, the inverse DFT of an N-point sequence X[k] can be implemented using this subroutine as follows: 1. Swap the real and imaginary parts of each DFT coefficient X[k]. 2. Apply the FFT routine to this input sequence. 3. Swap the real and imaginary parts of the output sequence. 4. Scale the resulting sequence by 1/N to obtain the sequence x[n], corresponding to the inverse DFT...
Compute the DFT for each of the foregoing signals using the
MATLAB M-file dft
(a) x[0) - 1,x[1] =0, x[2] = 1,x[3] = 0 (b) x[0] = 1, *[1] = 0, x{2) = -1, x[3) = 0 (e) x[0] = 1, x[1] = 1, x[2] = -1, x[3] = -1
2. (20 points) Let input x(n) (1 0 0) and impulse response h(n) (1 0). Each has length of N-3 and N 2, respectively. Append zeros to x(n) and h(n) to make the length of both equal to N+N-1 Find the output y(n) by using the DFT and the inverse DFT method.