i understand the solution except for the second line and 4th line
why do they need to assign x1 = zero(1,26) and after that, they add x1 like you see in 4th line and they change to (m-1) instead of (m+1) in the problem

Can anyone explain clearly for me, i've just started learning matlab for 2 months. Thanks in advance

yes, it look the same after i change the (m-1) to (m+1)
do you know when do we use the zeros because in this next problem :
n = [-25:25];
x2 = n.^2.*(stepseq(-5,-25,25)-stepseq(6,-25,25)) + 10*impseq(0,-25,25) + 20*0.5.^n.*(stepseq(4,-25,25)-stepseq(10,-25,25));
subplot(3,2,2);
stem(n,x2);
title('Sequence in Problem 2.1b')
they don't assign x1 = zeros() like in the above problem