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,

 채택된 답변

Arkaniva Sarkar
Arkaniva Sarkar 2021년 9월 5일

3 개 추천

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' ]).

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2021년 9월 5일

답변:

2021년 9월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by