Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab easy question

  1. Mar 11, 2009 #1
    matlab easy question!!!

    I,ve recently wrote a m-file in matlab which generates a kind of long bitstream,sience 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
  2. jcsd
  3. Mar 11, 2009 #2


    User Avatar
    Science Advisor

  4. Mar 16, 2009 #3
    Re: matlab easy question!!!

    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/" [Broken]
    Last edited by a moderator: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook