save ascii file of integer numbers

13 Ansichten (letzte 30 Tage)
Erika Meerhoff
Erika Meerhoff am 25 Jun. 2012
Kommentiert: Alexei Jolkin am 3 Feb. 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

Antworten (1)

Walter Roberson
Walter Roberson am 25 Jun. 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 Kommentar
Alexei Jolkin
Alexei Jolkin am 3 Feb. 2022
Yes, good idea! Like this, for example:
dlmwrite('indices.csv', indices, 'delimiter', ';', 'precision', '%d');

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Numeric Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by