Hi Zonda,
This is a strange question... why do you want to overlap-add like
this?
Normally you overlap-add a sequence of overlapping frames of data.
Also, you don't mention any Hamming (or other) window you are
applying.
Anyway, after that it's easy:
l1=len(signal1);
l2=len(signal2);
So I assume you want to start 50% of the way through signal1, then add
in signal 2.
So first create a result array, of length L;
L=l2+floor(l1/2)
r=zeros(1,L);
r(1:l1)=signal1;
r(floor(l1/2)+1:L)=r(floor(l1/2)+1:L)+signal2;
Simple! Next, test it out with some test matrices to make sure my
indexing is right. The floor(l1/2) is just in case the length of l1 is
odd, in which case you would get an error without this.
Best Regards,
audioeng