writing char array to a text file
14 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!