You can't have these strings in a vector because each element in a vector is a single integral type, so a double, integer, character, etc. What you want is a set of characters per entry, and if you want that it's best to use a cell array.
You can first create a cell array of strings that contain Mon to Sun, then just index into it with a modulo operator:
>> A = {'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'};
>> B = A(mod(0:29, numel(A)) + 1)
B =
Columns 1 through 9
'Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' 'Sun' 'Mon' 'Tue'
Columns 10 through 18
'Wed' 'Thu' 'Fri' 'Sat' 'Sun' 'Mon' 'Tue' 'Wed' 'Thu'
Columns 19 through 27
'Fri' 'Sat' 'Sun' 'Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat'
Columns 28 through 30
'Sun' 'Mon' 'Tue'
I wouldn't use a loop here, but if you insist on using a loop, you can iterate over from 1 to 30 and use the same principle:
A = {'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'};
B = cell(1,30); %// Initialize empty cell array
for idx = 1 : 30 %// Going from 1 up to 30...
index = mod(idx-1, numel(A)) + 1; %// Determine the right place to index into A
B(idx) = A(index); %// Get corresponding day and place into output
end
You'll get the same answer as above.