please excuse me if this is an extremely simple question as i am new to matlab.
My code goes as follows:
[x, fs] = audioread('stereo.wav');
LeftChan = x(:,1);
RightChan = x(:,2);
LengthLeft = length(LeftChan);
ZeroPad = zeros(1,558);
NewLengthLeft = LengthLeft + ZeroPad;
n = 2048;
N = NewLengthLeft/n;
for i = 1 : N
inputBuff = LeftChan((i - 1)*n+1 : i*n);
e = 0;
for j = 1 : n
e = e + inputBuff(j) * inputBuff(j);
end
end
i would like to add the zeros onto the end of the signal, however at the moment it doesnt seem to want to work.
Thanks in advance