Exporting a cell array whose dots were replaced by commas, results in added quotation marks

조회 수: 1 (최근 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?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 24일
편집: Ameer Hamza 2020년 4월 24일
Change to this line
writecell(str','test', 'QuoteStrings', false)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by