Group: | String Manipulation |
See also: | atof string substr char |
Function: | convert | |
Description: | converts numbers to strings depending on the ASCII table and vice versa in strings. |
Usage: | z = convert(x) | |
Input: | ||
x | n x p matrix of numerical elements or string of length m which should be ; converted | |
Output: | ||
z | string of length n*p representing the converted n x p matrix or ; m x 1 vector representing the converted string in ASCII code |
x = "hello world !" y = convert(x) y convert(y)
Contents of y [ 1,] 104 [ 2,] 101 [ 3,] 108 [ 4,] 108 [ 5,] 111 [ 6,] 32 [ 7,] 119 [ 8,] 111 [ 9,] 114 [10,] 108 [11,] 100 [12,] 32 [13,] 33 [14,] 0 Contents of convert [1,] "hello world !"