save ascii file of integer numbers

12 visualizaciones (últimos 30 días)
Erika Meerhoff
Erika Meerhoff el 25 de Jun. de 2012
Comentada: Alexei Jolkin el 3 de Feb. de 2022
Hi I have a logical matrix of 1 and 0 obtained with isnan I want to save it as ascii file, but integer numbers how can I do it? thank you very much sincerely
Erika

Respuestas (1)

Walter Roberson
Walter Roberson el 25 de Jun. de 2012
If "save" with the -ascii flag does not work for you, then use dlmwrite() with the delimiter set to ' ' (that is, a single space).
  1 comentario
Alexei Jolkin
Alexei Jolkin el 3 de Feb. de 2022
Yes, good idea! Like this, for example:
dlmwrite('indices.csv', indices, 'delimiter', ';', 'precision', '%d');

Iniciar sesión para comentar.

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by