strings
Character strings
Description
Strings are defined as 'string'
(between quotes) or
"string"
(between doublequotes);
matrices of strings are defined as usual constant matrices.
Strings can have a single or several characters. Multi-line strings are usually defined as a column vector of lines.
Concatenation of two strings is made by a +
: string1 + string2
.
Examples
['this','is'; 'a 2x2','matrix'] "matrix"=="mat"+"rix"
length("hello") // returns 5 part("hello", 2) // returns "e" part("hello", 1:4) // returns "hell" strcat(["hello", " ", "world"]) // returns "hello world"
mgetl("SCI/README.md") // reads a text file line by line
See also
Report an issue | ||
<< rational | types | type >> |