%% Center-Justify Text
% Create a cell array of character vectors. Some of the character vectors have leading and trailing whitespace characters.

C1 = {'Euler    ';
      'Fibonacci';
      '    Gauss'}

%
% Center-justify the text. If a piece of text has leading or trailing whitespace, or both, then strjust adjusts the text to have an equal number of leading and trailing whitespace characters. strjust does not alter a piece of text when it has neither leading nor trailing whitespace.

C2 = strjust(C1,'center')

% Copyright 2012 The MathWorks, Inc.