Borrar filtros
Borrar filtros

Binary data in Logical Array into a text file

6 visualizaciones (últimos 30 días)
jgillis16
jgillis16 el 11 de En. de 2016
Respondida: Walter Roberson el 11 de En. de 2016
Would it be possible to export binary data in a logical array into a text file?

Respuesta aceptada

Stephen23
Stephen23 el 11 de En. de 2016
Editada: Stephen23 el 11 de En. de 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

Más respuestas (1)

Walter Roberson
Walter Roberson el 11 de En. de 2016
save('temp.txt', X, '-ascii');

Community Treasure Hunt

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

Start Hunting!

Translated by