convert Char to string type
476 ビュー (過去 30 日間)
古いコメントを表示
I am reading data from serial port in the char format. the data format is
data = 1 2.2345
(1*9 char size {including space after 1, and new line character 5})
how to convert char into string?
0 件のコメント
採用された回答
Walter Roberson
2022 年 8 月 1 日
string(data)
2 件のコメント
Walter Roberson
2022 年 8 月 1 日
Ah I just noticed that you are using r2016a. string() objects were added in r2016b, so you cannot convert to string() objects in your release.
In your release you would use char vectors or cell array of character vectors; see also cellstr()
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!