Consider two finitelength sequences xn 0 n 3 and hn deltan

Consider two finite-length sequences, x[n] = {0 n 3 and h[n] = delta[n - 1] - delta[n - 2]. (a) Determine and plot the discrete convolution y[n] = x[n] * h[n] for these two sequences. (b) Note that the length of n[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 Greaterthan 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(2pi/N)^k. (c) Now form the product Y[k] = X[k]H[k] again expressed in terms of e^-j(2pi k/N)n. (d) From the result in part (c), determine the IDFT of Y[k] when N = 6. Compare your answer to the result of part (a). (e) Repeat when N = 4. In this case, the complex exponentials must be changed so that the exponents are less than 2pi (i.e., = e^-j(2pi/N)(N+k) = e^-j(2pi/N)^k if 0 lessthanorequalto k lessthanorequalto N - 1). (f) In general, Consider x[n] to have length L and h[n] to have length M. How should N bechosen so that the MATLAB statement y = ifft(fft(x,N). *fft(h,N)) produces the same result as the MATLAB statement y = conv (x, h)?

Solution

clear all;

close all;

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

subplot(3,1,1);

stem(x);

xlabel(\'time\');

ylabel(\'magnitude\');

title(\'input sequence\');

N=length(x);

y=(zeros(1,N));

x=bitrevorder(x);

g=1;

for m=1:1:(log(N)/log(2))

for n=1:1:N/2^m

for p=1:1:2^(m-1)

            a=x(g);

            b=x(g+2^(m-1));

            y(g)=a+b+exp(-i*2*pi*(p-1)/2^m);

            y(g+2^(m-1))=a-b*exp(-i*pi*(p-1)/2^m);

            g=g+1;

end

        g=2*m*n+1;

end

    g=1;

for t=1:1:N

        x(t)=y(t);

end

end

subplot(3,1,2);

stem(abs(x));

xlabel(\'time\');

ylabel(\'magnitude\');

title(\'magnitude of DIT-FFT sequence\');

subplot(3,1,3);

stem(angle(x));

xlabel(\'angle\');

ylabel(\'amplitude\');

title(\'angle of DIT-FFT\');

gtext(\'kluniversity\');

disp(abs(x))

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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site