|
From: | Henrik Bengtsson |
Subject: | [Octave-bug-tracker] [bug #42562] 3.8.1 can't load mat file (>maltab r2010b) |
Date: | Mon, 16 Jun 2014 20:50:32 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 |
Follow-up Comment #18, bug #42562 (project octave): Author of R.matlab here: Thanks for reporting on this out. I take it as R.matlab::writeMat() incorrectly writes R vectors as one-dimensional arrays (i.e. the dimension array subelement contains a single value) whereas the MAT file format requires at least two elements. I must admit that I've missed: "Dimensions Array Subelement This subelement specifies the size of each dimension of an n-dimensional array in an n-sized array of 32-bit values (miINT32). All numeric arrays have at least two dimensions. The Dimensions Array subelement is common to all MATLAB array types." (page 1-17 in http://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf) Q1. Should R vectors (=one dimensional arrays) be written as nx1 or 1xn arrays? Q2. Should I read this thread as you indeed updated Octave to workaround the one-dimensional case? /Henrik PS. It'll probably be a while before I fix this in R.matlab, because I have to careful about cases related to automatic translation/coercing of vectors-to-matrices in writeMat() and readMat(). _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?42562> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |