Another method to create delay effects involves the use of convolution and an impulse response. Convolution is a very important process in digital signal processing, and it is very common because it can be used for many types of delay effects. The convolution operation can be performed in Matlab by using a built-in function: conv.
The basic syntax for using the function is the following:
x – an array of samples representing the input signal.
h – an array of delay coefficients representing the system of processing.
y – an array containing the samples of the processed, output signal.
Further documentation for the function is available here.