Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to append a data (of specific format) from a text file to a csv file

조회 수: 1 (최근 30일)
Saugata Bose
Saugata Bose 2019년 9월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi
I am looking for your advices regarding apending a data (of specific format) from a text file to a csv file. I have been trying to resolve the issue, yet not succeed.
Input: (A.txt):
3,4,5
Output:(B.csv)
3,4,5
will be printed in a cell.
I have read the data from A.txt as a string. And I am trying to write the string to the csv file by this way
fprintf('%s',data)
where data is the string representation of the reading from A.txt
But I found that, 3,4 and 5 have not printed in a single cell. It has spread to 3 cells of a row which I do not want. Would you please suggest me a way to resolve the issue?
thanks,

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by