Binary data in Logical Array into a text file

조회 수: 2 (최근 30일)
jgillis16
jgillis16 2016년 1월 11일
답변: Walter Roberson 2016년 1월 11일
Would it be possible to export binary data in a logical array into a text file?

채택된 답변

Stephen23
Stephen23 2016년 1월 11일
편집: Stephen23 2016년 1월 11일
>> 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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 11일
save('temp.txt', X, '-ascii');

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by