So let's not stop there now we're on a roll. What about a cell array of strings? colors = {'Red', 'Green', 'Blue'}; for c = colors fprintf('My favourite color is %s\n', c); end Results in: ...
matlabrecipes.com