Problem in convert cell to string.
古いコメントを表示
I have a cell show like this
% code
val =
title="
google
">
The value is 3*7 char. If I want to convert into string to be ---> title="google"> What can I do? I have found many solution but can't help for this one. Thank you.
採用された回答
その他の回答 (1 件)
Sean de Wolski
2015 年 1 月 7 日
S = reshape(A',1,[])
No reason to convert to and from a cell.
3 件のコメント
Guillaume
2015 年 1 月 7 日
Yes, there is, the extra spaces that cellstr trims. Your solution has an extra space after 'google' and a bunch of them after the closing '>'.
Sean de Wolski
2015 年 1 月 7 日
編集済み: Sean de Wolski
2015 年 1 月 7 日
Ahh, I didn't realize cellstr implicitly calls deblank. Good to know!
Ara
2015 年 1 月 7 日
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!