Rust wrapper to MATLAB MAT file I/O library
This crate provides bindings and wrappers for MATIO: MATLAB MAT file I/O C library
Examples
Loading a mat file
use ;
let mat_file = load?;
Reading a scalar Matlab variable: a = π
use ;
let mat_file = load?;
if let Ok = mat_file.read
Reading a Matlab vector: b = [3.0, 1.0, 4.0, 1.0, 6.0]
use ;
let mat_file = load?;
if let Ok = mat_file.read
Reading a Matlab array: c = [4, 2; 3, 7]
use ;
let mat_file = load?;
if let Ok = mat_file.read
Saving to a mat file
use ;
let mat_file = save?;
let mut b = .map.;
mat_file.write
.write;
Writing a Matlab structure to a mat file
use ;
let mut mat = new?
.field?
.field?;
let mat_file = save?;
mat_file.write;
Writing a Matlab structure array to a mat file
use ;
let u = vec!;
let v: = u.iter
.map
.collect;
let mat = new
.field?
.field?
.build?;
let mat_file = save?;
mat_file.write;