Binary data in Logical Array into a text file

5 Ansichten (letzte 30 Tage)
jgillis16
jgillis16 am 11 Jan. 2016
Beantwortet: Walter Roberson am 11 Jan. 2016
Would it be possible to export binary data in a logical array into a text file?

Akzeptierte Antwort

Stephen23
Stephen23 am 11 Jan. 2016
Bearbeitet: Stephen23 am 11 Jan. 2016
>> X = randi(2,5)-1;
>> csvwrite('temp.txt',X)
creates a text file containing this:
1,1,0,0,1
1,1,0,1,1
1,0,0,0,1
1,1,1,1,0
1,0,1,1,0

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 11 Jan. 2016
save('temp.txt', X, '-ascii');

Kategorien

Mehr zu Text Data Preparation 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