How to convert arrays to strings in bulk at the same time similar with the function itoa in C language
1 回表示 (過去 30 日間)
古いコメントを表示
Recently, I try to converts numbers into strings in bulk, but I find the function num2str cost a long time if I convert them one by one with the command for.
Take an example in Matlab
A=ones(1e9,1);
for i=1:1e9
x=num2str(A(i));
end
The time it costs is related to the size of A, I want to convert arrays to strings in bulk at the same time so that the cost time has nothing to do with scale.
0 件のコメント
採用された回答
madhan ravi
2019 年 4 月 2 日
""+A
%or
string(A)
3 件のコメント
madhan ravi
2019 年 4 月 2 日
編集済み: madhan ravi
2019 年 4 月 2 日
What do you mean?, illustrate with an example.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!