I have two for loops which do the same thing to an array and I would like to join them together (if possible) to make my code tidier. Here are my two for loops.
for i = 1:K A(i,:,:)=B(i,:,:)endfor i = (n+1-K):n A(i,:,:)=B(i,:,:)end
How do i write the same thing in one for loop? Any responses would be really appreciated, thank you.
Best Answer