convlution matrix in four lines

This simple function generates the convolution matrix.
Updated 20 May 2008

No License

% CONV_MTX Convolution matrix.
% If 'x' is a column vector of length 'nx', then conv_mtx(x,nh) gives a toeplitz
% matrix 'X' of size (nx+nh-1) times (nh). 'nh' is the length of the column vector
% 'h' with which 'x' is convolved. Thus finally 'X*h' is same as conv(x,h).
% If 'x' and 'h' are row vectors, then 'X' is of size (nh) times (nx+nh-1).
% Then 'h*X' is same as conv(x,h). This does not depend on the in built command

Cite As

sri hari bhupala haribhakta (2024). convlution matrix in four lines (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes