%% Convolve Two Rectangular Sequences
% Note: If you are using R2016a or earlier, replace each call to the object with the equivalent step syntax. For example, obj(x) becomes step(obj,x).
% Create a dsp.Convolver object.

conv = dsp.Convolver

% Convolve two rectangular sequences.

x = ones(10,1);
y = conv(x,x);

%
% Plot the resulting convolved sequence, which is a triangular sequence.

plot(y)

% Copyright 2012 The MathWorks, Inc.