1

How can I import Real16 binary data? BinaryReadList doesn't work:

tmp = BinaryReadList[
   filename, {"Real16", "Real16", 
    "Real16", "Real16"}];
BinaryReadList::format: "\!\(\"Real16\"\) is not a recognized binary format."

Look at spec: https://en.wikipedia.org/wiki/IEEE_floating_point. There is such format. Why WM doesn't work with it?

So how can I import my data file (about 4x5000000 2bytes reals)?

vapor
  • 7,911
  • 2
  • 22
  • 55
Vasily
  • 31
  • 2
  • Where do they come from? According to the page you linked, the half-precision real format (16 bit) is not a basic standard format, so it doesn't seem to be supported directly. A conversion can be probably worked out, but you should include/link to some sample data. – MarcoB Jul 12 '16 at 17:41
  • I don't think it's good idea to upload 50-100 Mb files. It's just raw sensors data from 14bit ADC. You can generate any example. – Vasily Jul 12 '16 at 17:50
  • 1
    ... then generate a smaller sample file and upload that. – MarcoB Jul 12 '16 at 17:51
  • Please: http://www.filedropper.com/test_139. – Vasily Jul 12 '16 at 18:25
  • There must be 3x4=12 numbers that in Real32 format are: {0.275887, -0.980865, -0.00762963, -0.011597, 0.275582, -0.978423,
    -0.00854518, -0.0119022, 0.275582, -0.975677, -0.00854518, -0.0119022}
    – Vasily Jul 12 '16 at 18:27
  • 2
    The following suspiciously gets you what you claim are the correct values: 10. BinaryReadList[str, "Integer16"]/(2^15-1) – chuy Jul 12 '16 at 21:58

0 Answers0