MATLAB Functions | Help Desk |
strings
MATLAB string handling
S = 'Any Characters'
S = string(X)
X = numeric(S)
S = 'Any Characters'
is a vector whose components are the numeric codes for the characters (the first 127 codes are ASCII). The actual characters displayed depend on the character set encoding for a given font. The length of S
is the number of characters. A quote within the string is indicated by two quotes.
S = string(X)
can be used to convert an array that contains positive integers representing numeric codes into a MATLAB character array.
X = double(S)
converts the string to its equivalent numeric codes.
isstr(S)
tells if S
is a string variable.
s = ['It is 1 o''clock', 7]
char
Create character array (string)