Crate mocktave

source ·
Expand description

Github CI Crates.io docs.rs

Access Octave/MATLAB in the Rust Ecosystem

As much as I hate to say it, there is a lot of useful code living in .m files. Sometimes it might be nice to access that code in Rust.

Requirements

You must have a working installation of Docker.

Example Usage

let script = "              \
    z = 5.24;               \
    m = z*inv(eye(5, 5));   \
    m(1, 2) = 5;            \
    a = 5;                  \
    ";

let y = mocktave::eval(script);

println!("{y:#?}");

Structs

  • Contains the workspace that resulted from running the octave command in eval

Functions

  • Evaluate lines of Octave code