%% Remove Leading and Trailing Spaces from String Array
% Starting in R2017a, you can create strings using double quotes. Create a string array, and remove leading and trailing whitespace with the strtrim function.

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

%

newStr = strtrim(str)

% Copyright 2012 The MathWorks, Inc.