Question

Discrete-Time Periodic Signal 4 1. Convolution and Discrete-Time Fourier Series (DTFS) (a) Generate a periodic signal r2n] wi

It's about signals and systems. I need some help to make MATLAB codes of this problems. Thank you :)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE:

clc
clear all
close all

N = 60;
Omega = 2*pi/N;

fprintf('Omega = %d',Omega)

n = 0:N-1;
x2 = sin(2*pi.*n/10)+sin(2*pi.*n/20)+sin(2*pi.*n/30);
h2 = (1/2).^n;
y2 = conv(x2,h2);

subplot(3,1,1)
stem(n,x2);
xlabel('n')
title('x_2[n]')

subplot(3,1,2)
stem(n,h2);
xlabel('n')
title('h_2[n]')

subplot(3,1,3)
stem(y2);
xlabel('n')
title('Convolution of x_2[n] and h_2[n] is y_2[n]')

X2 = fft(x2);
fprintf('DTFS of x2[n]:\n')
disp(X2)

H2 = fft(h2);
fprintf('DTFS of h2[n]:\n')
disp(H2)

Y2 = N.*X2.*H2;
fprintf('DTFS of y2[n]:\n')
disp(Y2)

y = ifft(Y2);
fprintf('Inverde fourier trsnsform of Y2:\n')
disp(y)

OUTPUT:

-1 -2 60 50 4С 30 20 10 n h2n 1 0.8 0.6 0.4 0.2 60 50 30 20 Convolution of x,[n] and h2[n] is y2[n] 120 100 80 60 40 20

Add a comment
Know the answer?
Add Answer to:
It's about signals and systems. I need some help to make MATLAB codes of this problems. Thank you :) Discrete-Ti...
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
  • Solution required in MATLAB 1. Convolution and Discrete-Time Fourier Series (DTFS) (a) Generate a periodic signal r2[n]...

    Solution required in MATLAB 1. Convolution and Discrete-Time Fourier Series (DTFS) (a) Generate a periodic signal r2[n] with the fundamental period N ralla-sin(2nn/ İ0) + sin(2m, 2 ) + sin(2nn/30) for 0 < n < N-1 Find the fundamental frequency Ω0-2, N, with the fundamental period N. (b) Generate a periodic signal h2[n] with the fundamental period N haln] = (1/2)", for 0 < n < N-1 (e) Using the com ftuction n Matab, compute the compvolution (d) Using the...

  • I need help with the following DTFS problems for parts A and B. Thank you Prob....

    I need help with the following DTFS problems for parts A and B. Thank you Prob. 2_Discrete-Time Fourier Series (DTFs) (a) A periodic signal, z[n is shown below. Use the analysis equation to determine the discrete-time Fourier Series (DTFS) coefficients, ak. Please express the ak in terms of cosines. 9-7 -5-335 7 -0.5 Clk (b) Sketch the magnitude spectrum, la vs. k for 100 k 105. Please note each value laJ 100 101 103 104

  • Discrete-time signal. Question is regarding Signals and Systems. Find the fundamental period of each these functions....

    Discrete-time signal. Question is regarding Signals and Systems. Find the fundamental period of each these functions. (a) g[n]=cos(27n/10) (b) g[n] = cos(in/10)= cos(2īn/20) (c) g[n] = cos(2n/5)+cos(2 ron /7) (d) g[n]=ej 2an/20 +ej27n/20 (e) g[n]=e+j27n/3 + ej27n/4 (f) g[n]=sin(1310n/8) –cos(97n/6)=sin(2x1310n/16) -cos (2x3mn/4) (8) g[n]=e367n/21 + cos(22n/36)– sin(11ăn/33)

  • This is about signals and systems. I want to know anwser and solution. Please write down your han...

    This is about signals and systems. I want to know anwser and solution. Please write down your handwriting correctly and take a good picture. (1)[30 Points]Answer the following questions with 'T' for a true sentence or 'F' for a false sentence. (1-1) If the system is described as y(t) x(t) + 1, where the input signal and output signals are denoted by x(t) and y(t), respectively, the system is a linear system. (1-2) ( When a discrete time signal is...

  • Hi, can someone help me obtain the Figure 1 graph using Matlab? I need to see...

    Hi, can someone help me obtain the Figure 1 graph using Matlab? I need to see the code how you do the DTFT in Matlab. Thanks! The impulse response of a discrete-time LTI (linear time-invariant) system is, h[n] = Sinna Refer to Table 5.2 in the textbook for the basic discrete-time Fourier transform pairs The frequency response of the LTl system is, H (ejo, Here, H(e") is periodic with period 2 Step 2 of 31 Sketch the frequency response of...

  • 1. Using the Fourier series analysis Equation 3 for the periodic function r(t) shown in Figure 2....

    1. Using the Fourier series analysis Equation 3 for the periodic function r(t) shown in Figure 2.1, determine both the DC coefficient ao and a general expression for the other Fourier series coefficients ak. Do this by hand, not in Matlab. Show all your work in your lab report. You can add these pages as hand-written pages, rather than typing them in to your lab report, if you prefer Hint 1: It will be easiest to integrate this function from...

  • please step by step the main three question are the last three one thank you HW1...

    please step by step the main three question are the last three one thank you HW1 Description The MATLAB script accompanying this assignment simulates the approximation of the periodic function f() defined below using a Fourier series of N harmonics (including the fundamental frequency). In the script do, and the best a, and by coefficients are computed using their analytical expressions (corresponding to this definition of f(t) of course). There is also a parameter N that controls the maximum nth...

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
ADVERTISEMENT