number to string and char to string in table

18 vues (au cours des 30 derniers jours)
Martin
Martin le 16 Juil 2019
Modifié(e) : Adam Danz le 16 Juil 2019
how to convert number to string and char to string in a table?

Réponse acceptée

Adam Danz
Adam Danz le 16 Juil 2019
Modifié(e) : Adam Danz le 16 Juil 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:

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by