Question

Please answer the question and include matlab code and plots. Thank You Problem 1: The operation...

Please answer the question and include matlab code and plots. Thank You

Problem 1: The operation of signal dilation or decimation or down-sampling is defined by y(n) = x(nM) in which the sequence x(n) is down-sampled by an integer factor M. Explore Matlab’s downsample command to implement the above equation. Now generate x(n) = sin(0.125πn), for −50 ≤ n ≤ 50. Decimate x(n) by a factor of 4 to generate y(n). Plot both x(n) and y(n) using subplot and comment on the results. Repeat the above using x(n) = sin(0.5πn), for −50 ≤ n ≤ 50. Qualitatively discuss the effect of down-sampling on signals.

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


n=-50:1:50
x=sin(0.125*pi*n)
subplot(211)
stem(n,x)
xlabel('n');ylabel('x(n)');xlim([-50,50])
title('x(n)=sin(0.125 pi n)')

M=4;m=-50:M:50
y1=downsample(x,M)
subplot(212)
stem(m,y1,'r');xlabel('n');ylabel('y(n)');xlim([-50,50]);
title('y(n)=x(nM) for M=4')

n=-50:1:50
x=sin(0.125*pi*n)
subplot(211)
stem(n,x)
xlabel('n');ylabel('x(n)');xlim([-50,50])
title('x(n)=sin(0.125 pi n)')

M=8;m=-50:M:50
y1=downsample(x,M)
subplot(212)
stem(m,y1,'r');xlabel('n');ylabel('y(n)');xlim([-50,50]);
title('y(n)=x(nM) for M=8')

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

clc;close all;clear all;
n=-50:1:50
x=sin(0.5*pi*n)
subplot(211)
stem(n,x)
xlabel('n');ylabel('x(n)');xlim([-50,50])
title('x(n)=sin(0.5 pi n)')


M=4;m=-50:M:50
y1=downsample(x,M)
subplot(212)
stem(m,round(y1),'r');xlabel('n');ylabel('y(n)');xlim([-50,50]);
title('y(n)=x(nM) for M=4')

clc;close all;clear all;
n=-50:1:50
x=sin(0.5*pi*n)
subplot(211)
stem(n,x)
xlabel('n');ylabel('x(n)');xlim([-50,50])
title('x(n)=sin(0.5 pi n)')


M=5;m=-50:M:50
y1=downsample(x,M)
subplot(212)
stem(m,round(y1),'r');xlabel('n');ylabel('y(n)');xlim([-50,50]);
title('y(n)=x(nM) for M=5')



Add a comment
Know the answer?
Add Answer to:
Please answer the question and include matlab code and plots. Thank You Problem 1: The operation...
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
  • Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in...

    Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in the discrete time domain for any value of the shift k and for any range of it: nak *(1 – k) = fccm (c(n - keink 0. n<R Problem (9) MATLAB Problem) Subplot the following signals in the same figure choose an appropriate range for : x(n) = b cos (0.1bana ym) = 2"sin (0.1b mn + ) וחו

  • Q: please solve using matlab code withe comment 1.      Write the Matlab code to generate: x...

    Q: please solve using matlab code withe comment 1.      Write the Matlab code to generate: x = cos(w1*t) + cos(w2*t); where, w1=7; w2=23; t = [0:0.005:2] 2.   Plot the signal using sub plot a.   in time domain b.   in frequency domain 3)   Sample the signal under different sampling conditions: a.      Ts<1/2fm b.      Ts=1/2fm c.       Ts>1/2fm 4).      Multiple plot: the signal sampled under sampling condition and the signal x a.      in time domain b.      in frequency domain c.       Label and Title...

  • use MATLAB and PLZ comment the code so that it is easy to understand Implement the...

    use MATLAB and PLZ comment the code so that it is easy to understand Implement the following series of sinusoidal signals in MATLAB: 1 sin(kt) where N 30 k=1 x(t) k 1 Write a MATLAB script which does the following steps First define and plot signal sin(t) for 0 St s 3Twhere T is the fundamental period of this signal The signal you just implemented is x(t) with N 1 a. Then modify your code to be able to define...

  • 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 help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...

    Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any difference! The first picture is the question i need to answer. The picture below is used as reference to answer the question. The last picture (below) is the into to the problem, and is used as reference. 1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as shown. Arc System Response 15 E...

  • Hello, I'm taking signal systems course. please solve this question in matlab as soon as possbile please. Question 1 a) Write a function that calculates the Continuous Time Fourier Transform o...

    Hello, I'm taking signal systems course. please solve this question in matlab as soon as possbile please. Question 1 a) Write a function that calculates the Continuous Time Fourier Transform of a periodic signal x() Syntax: [w, X] = CTFT(t, x) The outputs to the function are: w = the frequencies in rad/s, and X = the continuous Fourier transform of the signal The inputs to the function are: x-one period of the signal x(t), andt the time vector The...

  • 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...

  • need the answer for G please and thank you 1. Find the Fourier series coefficients of...

    need the answer for G please and thank you 1. Find the Fourier series coefficients of the following periodic signals 2πη πη π x[n] = [1 + sin(一)I cos (C -) e. x[n] = ( 21)-) y[n-1], y[n] is a periodic signal with period N = 8 and Fourier f. series coefficients of bk - -bk -4 cOS

  • You have to use MATLAB to solve these questions. Please answer these 5 questions! ercise 1:...

    You have to use MATLAB to solve these questions. Please answer these 5 questions! ercise 1: pae). eate a graph of y cos4x over [0, n]. To illustrate what happens when there are too few points in your domain, first try a step size of n/ 10 1. Which command gives the desired values for x? Select exactiy one of the cholices 2. Which command gives the correct answer for Select exactly one of the choice y - cos(4x) y...

  • PLEASE FAST. WRITE IN C LANGUAGE I WILL RATE YOU UP!! In this quiz, you will...

    PLEASE FAST. WRITE IN C LANGUAGE I WILL RATE YOU UP!! In this quiz, you will work as an audio engineer to process sampled audio signals. Remember, a signal is a function of time, so we start by sampling the time axis (similar to sampling the x-axis). A common audio operation is to mix two signals together, which simply means add them together and scale them too). out = a.in, +b.in Here, in, and in, are the two input signals,...

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