Ваш код примерно в три раза быстрее, чем некоторые из предоставленных ответов:
%
n = 1000;
tic
myCell = cell(1,n);
for i = 1:n
myCell{i} = sprintf('x_%d', i);
end
toc
tic
aCell = arrayfun(@(x){sprintf('x_%d',x)},1:n);
toc
tic
bCell = strcat('x_',cellstr(num2str((1:n)')));
toc
tic
cCell = strcat('x_',strtrim(cellstr(num2str((1:n)'))));
toc
>> Elapsed time is 0.011541 seconds.
>> Elapsed time is 0.030992 seconds.
>> Elapsed time is 0.027931 seconds.
>> Elapsed time is 0.030453 seconds.