How can i convert multiples lines into 1 text string (big block)
1 次查看(过去 30 天)
显示 更早的评论
so my file is like:
abcdef
abcdef
abcdef
abcdef
and i would like them to be in 1 text string without enters: 'abcdefabcdefabcdefabcdef'
0 个评论
回答(2 个)
J. Webster
2016-4-22
file = textread('text.txt', '%s', 'whitespace','');
file will be a cell array containing the string you want.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!