MATLAB: I don’t understand about this row and column?

for loop

who know about this code? if N=8 and L=512
for i= N:N:L-N
for j = 1:L
and this one
for i= 1:L
for j= N:N:L-N
what is the different? thanx for any advance.

Best Answer

Well the first one starts at row (or column) 8 while the second one starts at 1. There are some other differences but you can just print them out to see:
N=8
L=512
i= N:N:L-N
j = 1:L
i= 1:L
j= N:N:L-N
Then look in the command window to see what they are.