Skip to content

Instantly share code, notes, and snippets.

@ThreeNG
Created January 17, 2014 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThreeNG/8482694 to your computer and use it in GitHub Desktop.
Save ThreeNG/8482694 to your computer and use it in GitHub Desktop.
function [y,ny] = conv_m(x,nx,h,nh)
% Modified convolution routine for signal processing
% --------------------------------------------------
% [y,ny] = conv_m(x,nx,h,nh)
% y = convolution result
% ny = support of y
% x = first signal on support nx
% nx = support of x
% h = second signal on support nh
% nh = support of h
%
nyb = nx(1)+nh(1); nye = nx(length(x)) + nh(length(h));
ny = [nyb:nye];
y = conv(x,h);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment