writing char array to a text file

12 ビュー (過去 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 Center および File ExchangeText Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by