/matlab-stdlib

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

Primary LanguageMATLABMIT LicenseMIT

Standard library for Matlab

DOI View stdlib for Matlab on File Exchange ci ci-nojvm

Matlab or GNU Octave 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 across numerous projects.

Matlab R2019b is the minimum required due to use of arguments syntax. URLs (e.g. https://, s3:// and similar) are treated as not existing.

Self-tests can be run from the matlab-stdlib/ directory:

%% Matlab R2023a or newer
buildtool test


%% Matlab R2021a or newer
addpath .
runtests("test")

Functions requiring or optionally benefiting from MEX are indicated in the API Documentation.

Build the optional high-performance MEX functions from the Matlab prompt in Matlab R2023a or newer:

buildtool mex

If just building MEX functions for the first time, to ensure the MEX functions are used instead of the plain Matlab script, one-time type clear functions in Matlab.

Java-based functions

Most Matlab-stdlib filesystem functions work without the Java interface. If Matlab was started without Java using -nojvm, most Matlab-stdlib functions still work. This CI job tests without Java.

Acknowledgments

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