is there a loop in matlab similar to (for in ) in R? -
in r if have index=[1,5,10]; use in index each element of vector: i=1, i=5, i=10 each iteration.
i not want go through size
for = 1:3 index(i) end
is there similar way in matlab?
you can write
for i=[1 5 10] here end;
for example
for i=[1 5 10] end;
will print
1 5 10
on console.
Comments
Post a Comment