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?
댓글 수: 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!