To plot convolution of two discrete signals in Matlab, you can use the conv function.
main.m255 chars13 lines
This will generate a stem plot of the convolution of the two signals. The stem plot shows the values of the convolution at each sample index.
You can also specify the range of n values for which to compute the convolution by using the conv function with three input arguments:
main.m323 chars13 lines
This will generate a stem plot of the convolution with values of n on the x-axis. The full option in the conv function pads the vectors with zeros so that the length of the convolution is equal to the sum of the lengths of the input vectors minus 1.
gistlibby LogSnag