Add echo as described by difference equation to audio signal (in MATLAB)
The impulse response $h[n]$ can be obtained by inspection:
$$
h[n] = \delta[n] + k \delta[n - d]
$$

In MATLAB notation this would be:

h = [1, zeros(1,d-1), k];


The output is computed by:

y = conv(x, h);


Note that the time sample indices for the vector y will be as follows, assuming that both x and h are indexed where the first element corresponds to time $n=0$:

ny = 0:(length(x) + length(h) - 2);