MATLAB: Binary data in Logical Array into a text file

arrayarraysbinarylogical?text filetext;textscan

Would it be possible to export binary data in a logical array into a text file?

Best Answer

>> 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