how can I convert an array in double format to string?

Hi,
How can I convert an array, previously imported to MATLAB, in double format to string?
Thank you,

 Respuesta aceptada

Arkaniva Sarkar
Arkaniva Sarkar el 5 de Sept. de 2021
You can either use string(arr) or num2str(arr), depending on what you desire. string(arr) will create a string array by converting each element in the array to string (for example, [ "1", "2", "3" ]) whereas num2str(arr) will convert the whole array into a string (example, [ '1 2 3' ]).

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Preguntada:

el 5 de Sept. de 2021

Respondida:

el 5 de Sept. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by