www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FullConvolutionOfTwoSignalsExample.m
%% Full Convolution of Two Signals % %% % Define and create stem plots for two discrete signals. % Copyright 2015 The MathWorks, Inc. u = [1 1 1]; stem(u) axis([0 4 0 1.5]) %% v = [1 1 0 0 0 1 1]; stem(v) axis([0 8 0 1.5]) %% % Find the full convolution of signals |u| and |v|. w = conv(u,v) %% % The length of |w| is |length(u)+length(v)-1|. %% % Create a stem plot of the result. stem(w) axis([0 10 0 2.5])