Working with a cell of strings

4 ビュー (過去 30 日間)
L'O.G.
L'O.G. 2022 年 12 月 3 日
回答済み: Voss 2022 年 12 月 3 日
I have a large N x 1 array of cells, each cell containing a string. How do I convert this to a string array, or to a cell array of character vectors?

採用された回答

Voss
Voss 2022 年 12 月 3 日
Use string or cellstr.
C = {"one";"two"}
C = 2×1 cell array
{["one"]} {["two"]}
string(C)
ans = 2×1 string array
"one" "two"
cellstr(C)
ans = 2×1 cell array
{'one'} {'two'}

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by