Re: Mathematica: how to set the format of binary numbers in plotting?
- To: mathgroup at smc.vnet.net
- Subject: [mg58621] Re: Mathematica: how to set the format of binary numbers in plotting?
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 10 Jul 2005 16:51:40 -0400 (EDT)
- References: <daqp0r$6dp$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
1.156 schrieb: > I use BinaryReadList[filename, "Integer16"] to bring in an array of > numbers. I then do a bunch of operations on these numbers and then try > to plot them. They should be signed integers and interpreted in 2's > complement but apparently they have been converted to unsigned binary as > far as I can tell -- and the plots are horrible. > > Can someone tell me how you can specify the interpretation (signed or > unsigned) of numbers before they are used in ListPlot[] ? Thanks. > Try to play around with the option ByteOrdering: BinaryReadList[filename, "Integer16", ByteOrdering->-1], if the file has been written on a x86 machine (or any other Processor using little endian) and ByteOrdering->1 for the others. Hope this helps, Peter -- Peter Pein Berlin http://people.freenet.de/Peter_Berlin/