Question

1. For each of the following choices of r(n) and N, you will perform the five tasks stated below (a) x(n (b) r(n)-2-a(n), Л-1

Task 4: Compute DTFT of y. You may not be able to obtain a closed form expression for the DTFT of y. However since y has fini

1. For each of the following choices of r(n) and N, you will perform the five tasks stated below (a) x(n (b) r(n)-2-a(n), Л-16, (d) x(n) is same as in part (c) with N = 8 otherwise
Task 4: Compute DTFT of y. You may not be able to obtain a closed form expression for the DTFT of y. However since y has finite duration of length N, you can just code the analysis equation in Matlab. Let y(k 1) = y(k) forS k1,... .N. Specifically, since the signal y(n) is 0 outside the interval 0
Comments
    0 0
    Add a comment Improve this question Transcribed image text
    Answer #1

    MATLAB code is given below in bold letters.

    clc;
    clear all;
    close all;

    % Question a
    N = 16;
    n = 0:N-1;
    x = 1./(2.^abs(n));
    % 1000 points for frequency axis
    k = 1:1000;
    w = 2*pi*(k-1)/1000;clear k;
    % initialize DTFTy
    DTFTy = zeros(size(w));
    for k = 1:length(w)
    DTFTy(k) = sum(x.*exp(-1j*w(k)*n));
    end

    figure;plot(w/(pi),DTFTy,'linewidth',2);grid;xlabel('w/pi');ylabel('Amplitude');
    title('Spectrum of x[n]=1/2^|^n^|');

    % Question b
    N = 16;
    n = 0:N-1;
    x = 1./(2.^n);
    % 1000 points for frequency axis
    k = 1:1000;
    w = 2*pi*(k-1)/1000;clear k;
    % initialize DTFTy
    DTFTy2 = zeros(size(w));
    for k = 1:length(w)
    DTFTy2(k) = sum(x.*exp(-1j*w(k)*n));
    end

    figure;plot(w/(pi),DTFTy2,'linewidth',2);grid;xlabel('w/pi');ylabel('Amplitude');
    title('Spectrum of x[n]=1/2^n');

    % Question c
    N = 16;
    n = 0:N-1;
    x = (n+1).*(n<=6) + (13-n).*(n>=7).*(n<=13);
    % 1000 points for frequency axis
    k = 1:1000;
    w = 2*pi*(k-1)/1000;clear k;
    % initialize DTFTy
    DTFTy3 = zeros(size(w));
    for k = 1:length(w)
    DTFTy3(k) = sum(x.*exp(-1j*w(k)*n));
    end

    figure;plot(w/(pi),DTFTy3,'linewidth',2);grid;xlabel('w/pi');ylabel('Amplitude');
    title('Spectrum of x_3[n]');


    % Question d
    N = 8;
    n = 0:N-1;
    x = (n+1).*(n<=6) + (13-n).*(n>=7).*(n<=13);
    % 1000 points for frequency axis
    k = 1:1000;
    w = 2*pi*(k-1)/1000;clear k;
    % initialize DTFTy
    DTFTy4 = zeros(size(w));
    for k = 1:length(w)
    DTFTy4(k) = sum(x.*exp(-1j*w(k)*n));
    end

    figure;plot(w/(pi),DTFTy4,'linewidth',2);grid;xlabel('w/pi');ylabel('Amplitude');
    title('Spectrum of x_4[n]');

    Spectrum of x[n]-1/2 nl 2 1.8 1.6 1.4 1.2 0.8 0.6 0 0.2 0.40.6 0.8 1 1.2 1.4 16 1.8 2 w/piSpectrum of x[n]-1/2 2 1.8 1.6 1.4 0.8 0.6 0 0.2 0.40.6 0.8 1 1.2 1.4 16 1.8 2 w/piSpectrum of xzln] 50 40 30 ) 20 T 10 0 -10 -20 0 0.2 0.40.6 0.8 1 1.2 1.4 16 1.8 2 wlpiSpectrum of x4In] 40 30 20 10 0 -10 -20 0 0.2 0.40.6 0.8 1 1.2 1.4 16 1.8 2 w/pi

    Add a comment
    Know the answer?
    Add Answer to:
    1. For each of the following choices of r(n) and N, you will perform the five tasks stated below ...
    Your Answer:

    Post as a guest

    Your Name:

    What's your source?

    Earn Coins

    Coins can be redeemed for fabulous gifts.

    Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
    Similar Homework Help Questions
    • I will upvote if u will solve What u need? DFT can also be obtained using matrix multiplication. Let X[r] show the transformed values and x[n] show the original signal. Using the analysis equa...

      I will upvote if u will solve What u need? DFT can also be obtained using matrix multiplication. Let X[r] show the transformed values and x[n] show the original signal. Using the analysis equation: Using matrix multiplication, this operation can be written as x[O X[1 1 e(2m/N) e-K4n/N) x12] [N-1]] e-j(2(N-1)T/N)e-j(4(N-1)m/N) Instead of huilt-in EFT function use matrix multinlication to solve 3th auestion [ 1 e-/(2(N-1)(N-1)T/N)]Le[N-1] DFT is an extension of DTFT in which frequency is discretized to a finite...

    • Please can you solve it using MATLAB. (1) Generate random signals [n] and hn, each of...

      Please can you solve it using MATLAB. (1) Generate random signals [n] and hn, each of length N, and measure the time it takes to compute the linear convolution of r[n using the linear convolution definition and using the FFT method . Plot a graph of the results for N 104 to 10 in steps of 10. (2) Consider the signal x[n]-cos(0.3n),。£11S 100. Generate a plot of: ·The magnitude and phase of the DTFT of x[n] for 0 2π The...

    • Consider the DT LTI system defined by the mpulse response h[n] = ?[n] The input to...

      Consider the DT LTI system defined by the mpulse response h[n] = ?[n] The input to this system is the signal rn: ?[n-1) (a) Sketch h[n] and r[n] (b) Determine the output of the systern, ylnj, using convolution. Sketch y[n] (c) Determine the DTFTs H(e) and X(e. Make fully-labeled sketches of the magni- tudes of these DTFTs (d) Recall that the discrete Fourier transform (DFT) is simply defined as samples of the discrete-time Fourier transform (DTFT). Compute the 4-point (N-4)...

    • Lab #2 Discrete-time Fourier Transform (DTFT) OBJECTIVES: • Explore the DTFT, its meanings and concepts. •...

      Lab #2 Discrete-time Fourier Transform (DTFT) OBJECTIVES: • Explore the DTFT, its meanings and concepts. • Get acquainted with Matlab/Octave 1) Start MATLAB and change the “Current Directory” in the top of the window (or type) >> cd '' (example: >> cd 'C:\NIU\lab2') Alternatively, if you don't want to use MATLAB, you can open a web-browser and go to “octave-online.net”. 2) Download and execute LAB2forStudent_A.M with >> lab2forStudent_A and observe that it produces a Discrete-Time (DT) signal xVec. 3) TO...

    • this is signal ....please answer clearly thank you For each problem below, convolve x[n) and h[n]...

      this is signal ....please answer clearly thank you For each problem below, convolve x[n) and h[n] by hand, and then compare the DTFT magnitude plots of X(12), H(12), and Y(12). In each case, does h[n) represent a low or high pass filter? Does the signal x[n) pass through the filter or get rejected? Why? (8) x[n] - [1 1 1] , h[n] - [1 -1] (9) x[n] - [1 0 -1 0], [n] - [11] (10) x[n] - [1 0...

    • Consider a finite length DT sequence of length N -16 described below. 1, 0<n< 2 Use...

      Consider a finite length DT sequence of length N -16 described below. 1, 0<n< 2 Use MATLAB built-in function dftmtx (N), and compute X[k] command and create stem plots for the following: DFT(X[k]. Use subplot (a) x n] vs n; (b) X[k] vs k; (c) angle (X [k) vs k. Label axes of these plots and include title for each of these plots

    • I Need Help with 4,6,8,10,15,18 Problems 123 If f(n) is a periodic sequence with period N,...

      I Need Help with 4,6,8,10,15,18 Problems 123 If f(n) is a periodic sequence with period N, it is also periodic with period 2N. Tet 8(k) denote the DFS coefficients of X(n) considered as a periodic sequence with period N and X,(k) denote the DFS coefficients of x(n) considered as a periodic sequence with period 2N. X,(k) is, of course, periodic with period N and X2(k) is periodic with period 2N. Determine 8(k) in terms of X (k). 5. Consider two...

    • [20 total pts) Consider the sequences x1n] = { 1, 2,-2, 1}, and x2 [n] =...

      [20 total pts) Consider the sequences x1n] = { 1, 2,-2, 1}, and x2 [n] = { 1, 2,-2, 1, 0, 0, 0, 0). The sequence x2In] is known as a zero-padded version of x,[n]. When answering the questions below, please use Table 1, provided on Page 3. a. [3 pts] Compute X1(eo), the Discrete-Time Fourier Transform (DTFT) of x1 [n], and evaluate it for the following values of normalized frequency: a-63 笎哮,쯤뀨 write the values in the table b....

    • please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab:...

      please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...

    • Please all thank you Exercise 25: Let f 0,R be defined by f(x)-1/n, m, with m,nENand n is the minimal n such that m/n a) Show that L(f, P)0 for all partitions P of [0, 1] b) Let mE N. Show that t...

      Please all thank you Exercise 25: Let f 0,R be defined by f(x)-1/n, m, with m,nENand n is the minimal n such that m/n a) Show that L(f, P)0 for all partitions P of [0, 1] b) Let mE N. Show that the cardinality of the set A bounded by m(m1)/2. e [0, 1]: f(x) > 1/m) is c) Given m E N construct a partition P such that U(f, Pm)2/m. d) Show that f is integrable and compute Jo...

    ADVERTISEMENT
    Free Homework Help App
    Download From Google Play
    Scan Your Homework
    to Get Instant Free Answers
    Need Online Homework Help?
    Ask a Question
    Get Answers For Free
    Most questions answered within 3 hours.
    ADVERTISEMENT
    ADVERTISEMENT