In Matlab, len
and sm
are variables representing the length of some array A
and some value to be checked B
respectively. i
is an arbitrary counter variable used in some loop iterating through A
from index 1
to len-sm
.
The condition i<=(len-sm)
is checking whether the current value of i
being looped through is less than or equal to the length of the remaining portion of the array A
yet to be processed after accounting for the offset sm
.
To put it simply, the loop only proceeds for the given condition and it won't process any items after the remaining length of the array.
gistlibby LogSnag