Exporting a cell array whose dots were replaced by commas, results in added quotation marks
2 次查看(过去 30 天)
显示 更早的评论
I have strings in a cell array, I would like to replace dots with commas and then export it in a text file.
The following code
str={'This. is a test'}
writecell(str','test')
generates a txt file containing
This. is a test
while the following
str={'This. is a test'}
str=strrep(str,'.',',')
writecell(str','test')
generates a txt file containing
"This, is a test"
why are quotation marks " added? And how to remove them?
0 个评论
采纳的回答
Ameer Hamza
2020-4-24
编辑:Ameer Hamza
2020-4-24
Change to this line
writecell(str','test', 'QuoteStrings', false)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!