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

772 ビュー (過去 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 Center および File ExchangeData Type Conversion についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by