ikarosilva / wfdb-app-toolbox

The WFDB Toolbox for MATLAB/Octave is a collection of functions for reading, writing, and processing physiologic signals in the formats used by PhysioNet (see README for details).
http://physionet.org/physiotools/matlab/wfdb-app-matlab/
GNU General Public License v3.0
92 stars 45 forks source link

rdsamp: octave compatibility fixes. #143

Closed bemoody closed 6 years ago

bemoody commented 6 years ago

Java arrays may or may not be directly usable as Octave matrices, depending on the version of Octave in use, the type of the array, and the dimensionality.

Octave 4.0 permits using 1D arrays of various types without any explicit conversion. 1D and 2D 'double' arrays can be converted using the builtin java2mat function. Other types can be converted (less efficiently) using the org.octave.Matrix class.

There are a lot of layers involved here, and a lot of magical bits I don't understand. The efficiency could certainly be improved.