writing char array to a text file

조회 수: 9 (최근 30일)
Danielle
Danielle 2011년 8월 25일
댓글: maira alvi 2015년 8월 5일
Hello ! I have a .mat file with two variables. One is char array and the other double. Im able to save out the 2nd variable using save('a.txt', 'var2',' -ASCII') but im unable to save the var1 since its a combination of chars and numbers. csvwrite isnt working either. Please advice Thank you

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 8월 25일
There are many ways, depending what you want.
a=['adc',char(10),'123']
dlmwrite('test.txt',a,'delimiter','');
edit test.txt
  댓글 수: 2
Danielle
Danielle 2011년 8월 25일
Thank you!
maira alvi
maira alvi 2015년 8월 5일
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by