%% Pad String Array to Specified Length
% Create a string array. Starting in R2017a, you can create strings using double quotes.

str = ["Mercury","Gemini","Apollo";
       "Skylab","Skylab B","ISS"]

%
% Specify the length so that even the longest string is padded with spaces.

newStr = pad(str,12)

% Copyright 2012 The MathWorks, Inc.