title: Reading binary file with Octave
body: <p>I'm trying to a binary file consisting of floats with Octave (on OS X), but I'm getting the following error:</p>
  
  <pre><code>octave-3.2.3:2&gt; load Input.dat R -binary
  error: load: failed to read matrix from file `Input.dat'
  </code></pre>
  
  <p>The file was written like so:</p>
  
  <pre><code>std::ofstream fout("Input.dat", std::ios::trunc | std::ios::binary);
  fout.write(reinterpret_cast&lt;char*&gt;(Buf), N*sizeof(double));
  fout.close();
  </code></pre>
  
  <p>Any idea what could be going wrong here? </p>