Cause of the Issue As of MATLAB R2025b, "convertContainedStringsToChars" does not recursively process tables. It only converts strings inside cells or struct fields and leaves tables unchanged. This is documented behaviour. Workaround Use the "convertvars" function to convert table variables between supported types. For example, to convert string variables in a table to cell arrays of character vectors: >> expected_output = table({'one'; 'two'}) >> string_table = table(["one"; "two"]) >> char_table = convertvars(string_table, vartype("string"), 'cellstr') For additional information, please refer to the documentation page on the "covertvars" function. Answer from MathWorks Support Team on mathworks.com
🌐
MathWorks
mathworks.com › matlabcentral › answers › 394985-string-to-character-array
string to character array - MATLAB Answers - MATLAB Central
April 15, 2018 - I have converted a string array to a character array c = cellstr(bb) d = char(c) when i index variable d, it gives me vertical characters instead of horizontal. for example i have a char...
Discussions

How can I convert strings inside tables back to character arrays using convertContainedStringsToChars in MATLAB R2025b?
I am working in MATLAB R2025b and using modern features like string arrays and tables. However, I need to maintain compatibility with a legacy codebase that requires outputs as char arrays or cell ... More on mathworks.com
🌐 mathworks.com
1
1
1 month ago
Use string or character arrays in code?
Often I use sprintf, uigetfile or other character/string based basic functions (even a simple isa is an example) that needs an input to be either a string or a character (sometimes even a cellstr is a good way of doing it). Years ago when I was doing similar stuff in previous MATLAB release ... More on mathworks.com
🌐 mathworks.com
2
2
June 8, 2020
How to convert an string array into a character array in Matlab? - Stack Overflow
Connect and share knowledge within a single location that is structured and easy to search. Learn more about Teams ... How can we convert the above string array into a character array by a function in Matlab like bellow? More on stackoverflow.com
🌐 stackoverflow.com
Help with splitting a string into a character array.
Let's say I have a string s='Potato'. How would I split that up into an array so that it looks like t='P, o, t, a, t, o'? ... The only problem with doing it this way is that there are two blank spots and the beginning and end of the character array. It looks like this when outputted: ... https://www.mathworks.com/matlabcentral... More on mathworks.com
🌐 mathworks.com
1
0
November 5, 2017
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types › data type conversion
char, ' ' - Character array - MATLAB
For example, the number 8451 corresponds to the symbol for degrees Celsius. Convert 8451 using char. ... Convert multiple arrays into a single character array. The input arrays need not have the same shape. ... Because the input arrays do not have the same number of columns, char pads the rows from A1 with blanks. ... Create a string scalar. You can create string scalars using double quotes. MATLAB...
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types
Characters and Strings - MATLAB & Simulink
MATLAB stores all characters as Unicode characters. Both strings and character vectors use the same encoding. You can convert characters to their Unicode code values, and numbers to characters.
Find elsewhere
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types › data type conversion
num2str - Convert numbers to character array - MATLAB
Convert the floating-point values returned by pi and eps to character vectors. ... Specify the maximum number of significant digits for floating-point values. ... Display pi as a floating-point number to a specified precision. ... Input array, specified as a numeric array. Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical Complex Number Support: Yes · Maximum number of significant digits in the output string, specified as a positive integer.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 1778410-how-to-assign-strings-to-a-character-array
how to assign strings to a character array? - MATLAB Answers - MATLAB Central
August 12, 2022 - You can convert chars to strings using the string function. ... Otherwise, you will need to take into consideration the legnth of your char, meaning your assignment must include row and column indices.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 57027-convert-char-to-string
Convert char to string - MATLAB Answers - MATLAB Central
December 20, 2012 - I just want to convert a char to str. The char is in a cell. This is what happens: >> example = ['hithere',socks] example = 'hithere' [1x34 char] >> taken = ['hit...
🌐
MathWorks
mathworks.com › matlabcentral › answers › 431985-how-to-convert-char-into-string
How to convert char into string? - MATLAB Answers - MATLAB Central
November 26, 2018 - I have "d879c14e5b1fa7a413aa46bbbc2b8710" this in char form and I want to convert this into string. As i want to split 2-2 character into binary so i want to split it into string. ... https://www.mathworks.com/matlabcentral/answers/431985-how-to-convert-char-into-string#comment_642392
🌐
MathWorks
mathworks.com › matlabcentral › answers › 339169-how-can-i-join-chars-to-a-string-vector
How can I join chars to a string vector? - MATLAB Answers - MATLAB Central
May 7, 2017 - If you really have a char array (85x19 is not a vector... these are not all that common now) and are using a recent version of MATLAB (I tested R2017a) then just call string on your array. If your array is a cellstr you should still be able to create a string array from it with the string constructor.
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types › data type conversion
Convert Numeric Values to Text - MATLAB & Simulink
str = 'Sine Wave, Frequency = ' + string(freq) + {' Hz'} ... If your data contains integers that represent Unicode® values, use the char function to convert the values to the corresponding characters.
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types › characters and strings
Create String Arrays - MATLAB & Simulink
You can index into, reshape, and ... type. You also can access the characters in a string and append text to strings using the plus operator. To rearrange strings within a string array, use functions such as split, join, and sort. MATLAB® provides string arrays to store pieces ...