Purchase Solution

MATLAB Convolution Simulation

Not what you're looking for?

Ask Custom Question

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

[1] 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)

function sout=convolution(sin1,sin2)
%put your code here with comments
2. Test with the following signals:
(Plot all results -> use the stem command)

Case 1:
h(n)=1 for 1<n<4
x(n)=1 for 1<n<4
Case 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.

3. 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?

To me it seems that convolution is autocorrelation because I worked an example by hand. Please comment the program so that I can see how it is done. Thank you.

Purchase this Solution

Solution Summary

The solution provides three MATLAB files that make up a convolution simulation program as required by the asker. It also answers the quesiton of correlations in words in the description.

Solution Preview

As we can see in the figures, in fact, the convolution is not the correlation. But it ...

Purchase this Solution

Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.