0

I've some problem if I try to load a matrix.mat <224x2 double> with Armadillo library:

mat A;

  A.load("matrix.mat");

  cout << " " << A.n_rows << " " << A.n_cols << "\n";

It prints: 5623 1

Can you tell me why?

tshepang
  • 12,111
  • 21
  • 91
  • 136
  • Try to display `A`'s content to verify this. – herohuyongtao Jan 15 '14 at 15:50
  • How was matrix.mat created ? Armadillo currently doesn't support reading binary matlab files. However, if you save matrix.mat in ascii format, Armadillo should be able to read it. – mtall Jan 15 '14 at 16:02
  • According to [this](http://arma.sourceforge.net/docs.html#save_load_mat), Armadillo does not support loading [binary MAT-file format](http://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf). It just understands plain-text formatted files (produced in MATLAB using: `save out.txt A -ascii`) – Amro Jan 16 '14 at 16:12

0 Answers0