writing char array to a text file

9 visualizaciones (últimos 30 días)
Danielle
Danielle el 25 de Ag. de 2011
Comentada: maira alvi el 5 de Ag. de 2015
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

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 25 de Ag. de 2011
There are many ways, depending what you want.
a=['adc',char(10),'123']
dlmwrite('test.txt',a,'delimiter','');
edit test.txt
  2 comentarios
Danielle
Danielle el 25 de Ag. de 2011
Thank you!
maira alvi
maira alvi el 5 de Ag. de 2015
Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by