I want to create a loop that will iterate over several strings, but unable to do so in Matlab.
What works is:
for i=1:3 if (i==1) b=\'cow\'; else
Or you can do:
for i={'cow','dog','cat'} disp(i{1}) end
Result:
cow dog cat