Exporting a cell array whose dots were replaced by commas, results in added quotation marks
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
giannit
el 24 de Abr. de 2020
Editada: Ameer Hamza
el 24 de Abr. de 2020
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 comentarios
Respuesta aceptada
Ameer Hamza
el 24 de Abr. de 2020
Editada: Ameer Hamza
el 24 de Abr. de 2020
Change to this line
writecell(str','test', 'QuoteStrings', false)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Code Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!