RosettaCodeData/Task/Loops-Foreach/MATLAB/loops-foreach-2.m

5 lines
143 B
Mathematica
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
list2 = {'AA','BB','CC'};
for k = list2, % list2 must be a row vector (i.e. array of size 1xn)
printf('%s\n',k{1})
end;