Logical Array Memory Allocation
Ältere Kommentare anzeigen
Why does Matlab allocate one byte for every element in a logical array? Is there a way to make it one bit per element?
Akzeptierte Antwort
Weitere Antworten (1)
Jan
am 28 Nov. 2011
0 Stimmen
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.
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!