Logical Array Memory Allocation
显示 更早的评论
Why does Matlab allocate one byte for every element in a logical array? Is there a way to make it one bit per element?
采纳的回答
更多回答(1 个)
Jan
2011-11-28
0 个投票
Modern Matlab versions use a byte to store LOGICALs, as most other programming languages do. Storing the single bits is much slower, as David has explained already.
BTW, Matlab 5.3 used DOUBLEs (64 bits!) and set an extra flag to mark the variable as LOGICAL.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!