char
Converts to a character array.
📝Syntax
res = char(var)
res = char(var1, var2)
res = char(var1, var2, ..., varN)
📥Input Arguments
Parameter Description
var a cell of strings, string array or an numeric array.
var1, var2, ..., varN strings or an numeric arrays.
📤Output Arguments
Parameter Description
res a string
📄Description
char converts numerical input into character data by taking the corresponding unicode character for each element.
💡Examples
M = [ 104   101   108   108   111;
20320   22909 32    32    32];
char(M)
R = char('these', 'are', 'test', 'strings')
R = char(["these"; "are"; "test"; "strings"])
🔗See Also
double
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub