Question
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] wher
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution of 5 by hand

ane uin-un-o) nin). { 1 1 1 1 1 1 3 o 1 2 3 4 5 in) yosal, you) = 1+1=2, 492) a 1+1+1=3,3)- 1+11+1=4 4 :1+1+1+F 25 415). 1+1

sb zo hi si si ol 9 q lo loh us=coight 6=5th = (by b 20 = state = (8) h hi a sthrer eta Ltd Si= stnt et 2 tiro - sosthre+zri

Here are the Matlab codes

n=0:20; x=[1 1 1 1 1 1 0 00000000000000); y=conv (x,x); subplot (211); stem (n,x), title(x(n)) subplot (212); stem (y), tit

x(n) 8 12 ا 14 16 18 | 20 y(n) 5 10 هههههههههههههههههههههههههههههه ا 15 20 ا 30 ا 35 25 40 45

n=0:20; x=[1 1 1 1 1 1 000OOOOOOOOOOOO; h=[0 1 2 3 4 5 000000000000000); y=conv(x,h); subplot (211); stem(n,x), title(x(n))

x(n) 1 2 4 6 8 10 12 14 16 18 20. y(n) 0 0 0 . 60000000000000000000000000 10. 25 40. | 15 20 30 35

Herr is the solution of 6

n=[0:20]; d=[10 00 00 00 00 00 00 00 00 00 0]; b=[1 -3]; a=(1 0.5]; h=filter (b,a,d); subplot (311); stem (n,h), title(h vs.

h vs. n 1 246 | 8 10 12 14 16 18 2 0 y vs. n - 09 . | 0 0 0 T | 2 4 6 8 10 12 14 16 1820 y1 vs. n . ਚ 900000000000000000000

Please thumbs up

Add a comment
Know the answer?
Add Answer to:
please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab:...
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
  • Please provide MATLAB code and plot, about system response. Will thumbs up. Thanks. Question 1: MATLAB contains a built-...

    Please provide MATLAB code and plot, about system response. Will thumbs up. Thanks. Question 1: MATLAB contains a built-in function called conv which performs the convolution of two vectors: >> help conv conv Convolution and polynomial multiplication. C - conv(A, B) convolves vectors A and B. The resulting vector is length MAX ([LENGTH (A)+LENGTH (B)-1, LENGTH(A),LENGTH (B) 1) If A and B are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials. Compute the system response...

  • 1. Write a Matlab function to convolve two sequences objects: function y = conv(x, h) %...

    1. Write a Matlab function to convolve two sequences objects: function y = conv(x, h) % CONV Convolve two finite-length Matlab sequence objects, x and h % returning sequence object, y. When you convolve x[n] and h[n] , you may not use MATLAB's numerical conv routine. 2. write a second convolution function, conv_rt, in Matlab that basically implements a real-time convolu- tion strategy: function y = conv_rt(x, h) % Convolve two finite-length arrays, x and h % returning array, y...

  • Help please! Problem No. P1: Convolution Below is a Matlab code for performing convolution of two...

    Help please! Problem No. P1: Convolution Below is a Matlab code for performing convolution of two sequences. function [y,ny] conv m(x,nx,h,nh) % Modified convolution routine for signal processing [y,ny] convolution result x,nx] first signal Dh,nh] second signal nyb nx(1)+nh(1); nye nx(length(x)) y-conv (x,h); Use the code to perform convolution of r) 1.2,3,4 and h( 3.2,1 nh (length(h));

  • I need help with this MATLAB exercise. The given system is y[n] - (3/10)y[n-1] - (1/10)y[n-2]...

    I need help with this MATLAB exercise. The given system is y[n] - (3/10)y[n-1] - (1/10)y[n-2] = 2x[n] The input x[n] is 2cos(2*pi*n/6)(u[n] - u[n-10]) Don't have to answer part 2 of the question. Zero-state response of a system can be found by using convolution of the input signal and unit impulse response: Use conv command from MATLAB to compute the zero-state response of the system defined in part B to the input x[n] in part C. 1. 2. 3....

  • A causal discrete-time system is described by the following difference equation: Use Matlab to write a...

    A causal discrete-time system is described by the following difference equation: Use Matlab to write a script to complete the following tasks. Turn in the output created by the Matlab "publish" utility. (a) Compute and plot the impulse response h[n], 0くn 〈 50. Use the function h=imp2(b, a , N ) to find the impulse response, and use the stem ) function to create the plot. (b) Let x[n] be defined by (n - 15)2 0n K 30 x[n] elsewhere...

  • Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes co...

    Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...

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

  • Use Matlab to solve. i) Declare a vector of length 256 samples. The first 100 samples...

    Use Matlab to solve. i) Declare a vector of length 256 samples. The first 100 samples is 1 and the next 146 samples are zero. This will be our low pass filter (10 points) ii) Use MATLAB's ifft function to compute the inverse transform of the filter you designed in 1 (i). This will be the impulse response of our filter (5 points) Define a DT signal x[n] = 3 cosen is provided as input the filter. Plot i Use...

  • Just the program code please, thank you Question: How to compute the convolution of these two...

    Just the program code please, thank you Question: How to compute the convolution of these two signals in MatLa.. (1 bookmark) How to compute the convolution of these two signals in MatLab, without using the conv function/command System response: y(t)= 2tu(t)-3(t-1)u(t-1)-(t2)u(t-2) should be this one according to the book's solutions. Suppose that the system of Figure P3.2(a) has the input x(t) given, in Figure P3.2(b). The impulse response is the unit step fund ion h(t)u(t). Find and sketch the system...

  • MUST BE IN MATLAB Design a low pass filter for this signal. Set the pass band...

    MUST BE IN MATLAB Design a low pass filter for this signal. Set the pass band frequency to 4.9 GHz and the stop band frequency to 5.6 GHz. Allow for 1 dB of attenuation in the pass band and require at least 20 dB of attenuation in the stop band. a. First design a Butterworth filter. Use the command buttord() to determine the order and the normalizing frequency for the filter. Use [Num,Den]=butter() to determine the numerator and denominator coefficients...

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