number to string and char to string in table

16 views (last 30 days)
how to convert number to string and char to string in a table?

Accepted Answer

Adam Danz
Adam Danz on 16 Jul 2019
Edited: Adam Danz on 16 Jul 2019
% Create fake data
T = table((1:5)',('a':'e')','VariableNames', {'col1','col2'});
% Convert num-to-string and char-to-string
T.col1 = string(T.col1);
T.col2 = string(T.col2);
More info on characters vs. strings:

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!