1
$\begingroup$

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)?

$\endgroup$

closed as off-topic by MarcoB, user9660, Jens, Mr.Wizard Jul 19 '16 at 9:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – MarcoB, Community, Jens, Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ 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. $\endgroup$ – MarcoB Jul 12 '16 at 17:41
  • $\begingroup$ 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. $\endgroup$ – Vasily Jul 12 '16 at 17:50
  • 1
    $\begingroup$ ... then generate a smaller sample file and upload that. $\endgroup$ – MarcoB Jul 12 '16 at 17:51
  • $\begingroup$ Please: filedropper.com/test_139. $\endgroup$ – Vasily Jul 12 '16 at 18:25
  • 2
    $\begingroup$ The following suspiciously gets you what you claim are the correct values: 10. BinaryReadList[str, "Integer16"]/(2^15-1) $\endgroup$ – chuy Jul 12 '16 at 21:58

Browse other questions tagged or ask your own question.