Let's say I've a cell array of string:
A = {'hello','world','how','are','you'};
I want to add the letter z
at the end of every string, in order to obtain:
Az = {'helloz','worldz','howz','arez','youz'};
I'm using a for loop to accomplish this task, however I would like to improve it as much as possible.
This is the code I'm currently using:
Az = cell(size(A)); % Preload
for i = 1:size(A,2)
Az{i} = [A{i},'z'];
end
Any suggestion?