MATLAB: How to print result in MATLAB

charfprintfnum2strprint

Dear everyone,
Please help me to solve this problem. I have two arrays like this:
Name=['ABC-8' 'S8' 'EG8'];
Thick=[25 16 12];
I want to create an array like this:
Z=['ABC-825' 'S816' 'EG812'];
Can anyone help me to write a code to make that array?
Thank you so much!

Best Answer

Robert is right, you must define it as a cell array.
name={'ABC-8' 'S8' 'EG8'};
thick=[25 16 12];
for i=1:3
thin{i} = [ num2str( thick(i) ) ];
z{i} = strcat(name{i},thin{i});
end
disp(z);