MATLAB: Creating a cell with serial names

cell arrays

Hello,
I want to create a list (1×15 cell) of 15 names (sometimes more than that) with names of following pattern;
AB_01, AB_02, AB_03,….AB_15.
Is there an easy way to do this , in a loop like, rather than type it each.
Thanks

Best Answer

How about the following?
suffix = repmat({'AB_'},15,1);
number = cellstr(num2str((1:15)','%02d'));
output = strcat(suffix,number)';