[Date Index] [Thread Index] [Author Index]
Re: Mathematica: how to set the format of binary numbers in plotting?
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/