This is the code Walter provided in your previous question. It's a different way to do zero-padding.
Conventional Way: (assume ADSR is a 1xn vector)
x=ADSR; x=[ADSR,zeros(1,100)];
Walter's suggestion is to set x to be all zero first and then copy the value of ADSR to the beginning of x, that is what x(1:length(ADSR)) = ADSR does.
The potential issue is to make sure the length of x is bigger than the length of ADSR. Otherwise, x will end up with the same as ADSR.
Best Answer