Consider two finitelength sequences xn 0 n3 and hn 28n d

Consider two finite-length sequences, x[n] = { 0 n3 and h[n] = 28[n] - delta[n - 1] - delta[n - 2]. Determine and plot the discrete convolution y[n] = x[n] * h[n] for these two sequences. Note that the length of x[n] is 4 and the length of h[n] is 3 samples. Therefore, each sequence can be represented by an N-point DFT with N ge 4. Zero padding would be used to extend the lengths when N > 4. Determine expressions for the N-point DFTs X[k] and H[k]. Do not obtain numerical answers-instead express your answers in terms of e-j(2 pi n/N)k. Now form the product Y[k] = X[k]H[k] again expressed in terms of e-j(2 pi/N)k. From the result in part (c), determine the IDFT of Y[k] when N = 6. Compare your answer to the result of part (a). Repeat when N = 4. In this case, the complex exponentials must be changed so that the exponents are less than 2 pi (i.e., e-j(2 pi/N)(N+k) = e-/(2 pi/N)k if 0

Solution

clear all;

close all;

%x=[1 2 3 4]

x=input(\'enter the input sequence\');

n=input(\'enter the lenth of DFT\');

subplot(4,1,1);

stem(x);

xlabel(\'time\');

ylabel(\'amplitude\');

title(\'input signal\');

y=fft(x,n);

subplot(4,1,2);

stem(y);

xlabel(\'frequency\');

ylabel(\'amplitude\');

title(\'discrete fourier transform\');

z=abs(y);

subplot(4,1,3);

stem(z);

xlabel(\'frequency\');

ylabel(\'magnitude\');

u=angle(y);

subplot(4,1,4);

stem(u);

xlabel(\'frequency\');

ylabel(\'phase plot\');

 Consider two finite-length sequences, x[n] = { 0 n3 and h[n] = 28[n] - delta[n - 1] - delta[n - 2]. Determine and plot the discrete convolution y[n] = x[n] * h

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site