title: How to import matrix into armadillo using binary files?
body: <p>I am trying to import a matrix generated in MATLAB into armadillo. For example, I have a matrix &quot;A&quot; which is 100x1 double. I used information from a previous question on stackoverflow to generate a binary file using MATLAB:</p>
  <pre><code>% Generate LocalX.bin
  name = 'LocalX.bin';
  [F,err] = fopen(name,'w');
  if F&lt;0,error(err);end
  fwrite(F,LocalX, 'int32');
  fclose(F);
  </code></pre>
  <p>and I imported it into armadillo using:</p>
  <pre><code>arma::Mat&lt;int&gt; LocalX;
  std::string localx = &quot;LocalX.bin&quot;;
  LocalX.load(localx, arma::arma_binary);
  </code></pre>
  <p>The issue is, I have lost the matrix dimensions and I cannot perform any matrix manipulation on it using aramdillo.</p>
  <p>How do I import the data into armadillo while maintaing the matrix dimensions?</p>
  <p>Thank you.</p>
  <p>(First time asking a question on stackoverflow)</p>