%% Escape Characters in String Array
% Create a string array that includes escape-character sequences to specify horizontal tabs. Use the compose function to translate the \t escape characters. Starting in R2017a, you can create strings using double quotes.

str = ["Name\tDate of Birth\tLocation";...
       "Jones\t10/20/2015\tUK";...
       "Simpson\t09/12/2015\tUSA"];
newStr = compose(str)

%
% Prevent translation of \n using another \ character.

str = "Don't escape the second\n\\n escaped-character sequence.";
newStr = compose(str)

% Copyright 2012 The MathWorks, Inc.