Skip to content

geospace-code/matlab-stdlib

Standard library for Matlab

DOI View stdlib for Matlab on File Exchange ci

Matlab users coming from other languages will benefit from the functionality contained within this user-developed, unofficial "stdlib" standard library of functions. These system, filesystem, and HDF5 / HDF4 / NetCDF functions are used by numerous independent projects.

Self-tests

The self-tests can be run from the top matlab-stdlib/ directory.

Matlab R2022b and newer:

buildtool test

Matlab R2017a and newer:

test_main

For the functions compatible with GNU Octave:

addpath(pwd)
oruntests('+stdlib/')

External language backends

Our functions that aren't possible in native Matlab code are implemented using Matlab's no-compile external language interfaces. The API listing "backend" column tells which functions have selectable backend implementations. By default, when the "backend" is not specified to a function having selectable backend, the algorithm searches for the first available backend and uses that. The user can specify the backend as listed in the API for those functions by specifying say "java" etc. as available per-function. Normally the user does not specify the backend as we prioritize faster backends.

  • .NET
    • Windows: all supported Matlab releases
    • Linux / macOS: R2024b and newer
  • Java: all supported Matlab releases
  • Perl: Matlab R2018a and newer. This uses a system() call to Perl, which is bundled with Matlab on Windows and generally available on Linux and macOS
  • Python: Matlab R2022b and newer
  • System shell calls: all supported Matlab releases. As a backup when the platform doesn't have the primary (faster) methods available, the system shell can be called for some functions.

Acknowledgments

Stdlib for Matlab was partly funded by NASA NNH19ZDA001N-HDEE grant 80NSSC20K0176.

About

HDF5, NetCDF4, fileio, system functions that act as an unofficial "stdlib" for Matlab.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •