Adding echo to audio sample
Here is the code for adding the two signals(the delayed and not-delayed): 

    x = getaudiodata(recObj); n1 = 1:size(x,1);%audiodata of original signal
    y = time_delay(x , 50000 ); n2 = 1:size(y,1);%audiodata of delayed signal
    mixed = sigadd(x,y,n1,n2); %audiodata of mixed signal
    mixrecObj = audioplayer(mixed,44100);
    play(mixrecObj);


This is the sigadd function:

function [ y,n ] = sigadd( x1,x2,n1,n2 )
%implements y[n] = x1[n] + x2[n]
%y = sum sequence over n wich includes n1 and n2
%x1 = first sequence over n1
%x2 = second sequence over n2
%

n = min(min(n1),min(n2)):max(max(n1),max(n2)); %duration of y(n)
y1 = zeros(1,length(n)); y2 = y1;
y1(find((n &gt;= min(n1))&amp;(n &lt;= max(n1)) == 1)) = x1;
y2(find((n &gt;= min(n2))&amp;(n &lt;= max(n2)) == 1)) = x2;
y = y1 + y2;
end


This works perfectly, but is not enough for getting a real echo effect. In order to archieve this we have to 
create more delayed signals(with diferent delays of course), and then add them all,like this:

x = getaudiodata(recObj); n1 = 1:size(x,1);
y = tim_delay(x , 5000 ); n2 = 1:size(y,1);
s = time_delay(x , 4000 ); n3 = 1:size(s,1);
d = time_delay(x , 3000 ); n4 = 1:size(d,1);
mixed1 = sigadd(s,d,n3,n4);n5 = 1:size(mixed1,2);
mixed2 = sigadd(x,y,n1,n2);n6 = 1:size(mixed2,2);
totmixed = sigadd(mixed1,mixed2,n5,n6);
mixrecObj = audioplayer(totmixed,44100);
play(mixrecObj);


I have tested this one with the three delays plus the original and you can hear a pretty nice echo.

Note: In the third piece of code it would have be better if there were a function that returned the signal with the echo by passing an echo effect index  as a parameter to it, but I left it that way for the sake of simplicity.