Given the code :
function[p] = addMoreCells(v,n) % adding zero at the beginning k = length(v); if (k ~= n) p = zeros(1,n); for m = (n-1):-1:(n-k) p(m+1) = v(k-(n-m-1)); end else p = v; end end
I build a new array with
n cells and put there
0 , later I add the other cells from
It there a built in command that can perform that instead ?