Saving integer as a bit
显示 更早的评论
I have an array which contains only 0s and 1s. Each data pt is getting saved as an 8 bit integer. How do I save it as a bit to save my memory space?
回答(2 个)
Mohammad Reza Naderi
2020-7-29
0 个投票
fwrite(fileID,A,precision,skip) Use fwrite for this work. https://www.mathworks.com/help/matlab/ref/fwrite.html#d120e398961
1 个评论
Mohammad Reza Naderi
2020-7-29
If you want to save with specific precision use instead of precision ubitn
类别
在 帮助中心 和 File Exchange 中查找有关 Whos 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!