Perform the convolution of two discrete signals


Discuss the below:

Create and verify a computer program to perform the convolution of two discrete signals.

Q1 The convolution program should be written as an m-file able to handle two general discrete signals. The M-file will be ain function file format, it will take two inputs sin1, sin2, and return an output sout.

sin1, sin2: can be row or column vectors of any length
sout: will be a row vector (length is determined by input vectors)

Ex:
function sout=convolution(sin1,sin2)
{
%put your code here with comments
}

Q2. Test with the following signals:
(Plot all results -> use the stem command)

Case 1:
h(n)=1 for 1x(n)=1 for 1Case 2:
h(n)=1 for n=1,2,...10
x(n)=(1/2)^n-1 for n=1,2,...20

All functions equal zero in regions not defined above. Use MATLAB conv function to verify your program.

Q3. Similiar to convolution is an operation known as correlation. This operation is used in signal analysis to determine the similiary between two signals. Explore the functionality of correlation through the use of MATLAB xcorr command. Plot the results of xcorr for the two cases provided above. What is the relationship of correlation to convolution?

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Perform the convolution of two discrete signals
Reference No:- TGS01938856

Now Priced at $25 (50% Discount)

Recommended (94%)

Rated (4.6/5)