%% Match Specified Characters
% Create a string that contains several temperatures, indicated by the degree symbol and the letter F. Convert the temperatures to a numeric array.
% Starting in R2017a, you can create strings using double quotes. To insert the degree symbol (char(176)), use the insertBefore function.

T = "78F 72F 64F 66F 49F";
degreeSymbol = char(176);
T = insertBefore(T,'F',degreeSymbol)

%
% Return the temperatures as a numeric array.

A = sscanf(T,strcat("%d",degreeSymbol,"F"))

% Copyright 2012 The MathWorks, Inc.