number to string and char to string in table

18 visualizaciones (últimos 30 días)
Martin
Martin el 16 de Jul. de 2019
Editada: Adam Danz el 16 de Jul. de 2019
how to convert number to string and char to string in a table?

Respuesta aceptada

Adam Danz
Adam Danz el 16 de Jul. de 2019
Editada: Adam Danz el 16 de Jul. de 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:

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by