The for
loop in Matlab is used to iterate over a range of numeric values. The length
function can be used to determine the number of elements in a given array.
To loop through the elements of ytick
array, the syntax would be:
main.m142 chars5 lines
This will execute the code within the loop for each element in ytick
, from the first element (i = 1
) to the last element (i = length(ytick)
).
gistlibby LogSnag