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

조회 수: 764 (최근 30일)
Hugo
Hugo 2021년 9월 5일
답변: Arkaniva Sarkar 2021년 9월 5일
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일
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개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by