Store long bitstream with one bit per element instead of doubles

  • Topic: MATLAB 
  • Thread starter Thread starter shekoofy
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
shekoofy
Messages
4
Reaction score
0
matlab easy question!

hi,
I,ve recently wrote a m-file in MATLAB which generates a kind of long bitstream,science it is a long stream i wonder if there is any pisibility that i could put them in a form that each bit occupies
exactly one bit rather than a double in workspace.
thank u all
 
Physics news on Phys.org


shekoofy said:
hi,
I,ve recently wrote a m-file in MATLAB which generates a kind of long bitstream,science it is a long stream i wonder if there is any pisibility that i could put them in a form that each bit occupies
exactly one bit rather than a double in workspace.

Yes, you could use one of the longer integer data types and bit-level operators. Try:

help uint64
help bitset
help bitget




-Will Dwinnell
http://matlabdatamining.blogspot.com/"
 
Last edited by a moderator: