I have an audio signal of length 82778 with Fs 44100. after applying a customise function on chunks of .25 second. I want to add zero paddings of .25*.5*Fs before and after the output of the loop, so I can get the same length of the original signal.
[x, Fs] = audioread('RobynSpeakingFrom.wav');
time=length (x)/Fs; %time in second
N=Fs*0.250; %number of samples per chunk
M=length(x)-N; % the mumber of the required signals
Fundamental=zeros(1,M); %signal frame
for i=1:M
s = i;%start
e = i+N-1;%end
chunk = x(s:e);
fundamental = F0(chunk,Fs);
Fundamental(i)=fundamental;
end