How do you plot a discrete convolution in Matlab?
Matlab Code for Discrete Convolution
x = [ 2 -1 1]; h = [ 3 2 1]; subplot( 3, 1, 1); t = a : a+length(x)-1; //tstep is not required here. stem( t, x); subplot( 3, 1, 2); t = b : b+length(h)-1; stem( t, h); y = conv( x, h); subplot( 3, 1, 3); t = a+b : a+b+length(y)-1; stem( t, y);