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 Center および File ExchangeText Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by