Module: NMatrix::IO::Matlab

Extended by:
AutoloadPatch
Defined in:
lib/nmatrix/nmatrix.rb,
lib/nmatrix/io/mat_reader.rb,
lib/nmatrix/io/mat5_reader.rb

Overview

Reader (and eventually writer) of Matlab .mat files.

The .mat file format is documented in the following link:

Defined Under Namespace

Classes: Mat5Reader, MatReader

Class Method Summary collapse

Methods included from AutoloadPatch

const_missing

Class Method Details

.load_mat(file_path) ⇒ Object Also known as: load

call-seq:

load(mat_file_path) -> NMatrix
load_mat(mat_file_path) -> NMatrix

Load a .mat file and return a NMatrix corresponding to it.



72
73
74
# File 'lib/nmatrix/nmatrix.rb', line 72

def load_mat(file_path)
  NMatrix::IO::Matlab::Mat5Reader.new(File.open(file_path, "rb+")).to_ruby
end