In Python, we have a convenient enumerate function:
for i,item in enumerate(foo_list): do something
Is there a matlab equivalent for enumerate ?
Currently, I can think of something like the following (Matlab code):
i=1; for foo=foo_list .... i=i+1; end
source share