stdlib API

A standard library of functions for Matlab.

Git branch / commit: main 2ec0ee3

Project URL: https://github.com/geospace-code/matlab-stdlib

API Reference

ABSOLUTE Determine absolute path
AUTO_CHUNK_SIZE determine HDF5 / NetCDF4 chunk size
CANONICAL Canonicalize path
CHECKRAM estimate if RAM will fit a new array
CPU_ARCH get the CPU architecture (requires: java)
CPU_COUNT how many CPUs are available
CPU_LOAD get total physical CPU load (requires: java)
CREATE_SYMLINK create symbolic link (optional: mex)
DISK_AVAILABLE disk available space (bytes) (requires: mex or java)
DISK_CAPACITY disk total capacity (bytes) (requires: mex or java)
DROP_SLASH drop repeated and trailing slash (optional: mex)
EXISTS does path exist
EXPANDUSER expands tilde ~ into user home directory
FILE_CHECKSUM compute hash of file (requires: java)
FILE_SIZE size in bytes of file
FILENAME file name of path
FILESYSTEM_TYPE tell type of filesystem (requires: java)
GET_MODTIME get path modification time (requires: java)
GET_OWNER owner of file or directory (requires: java)
GET_PERMISSIONS permissions of file or directory
GET_PID process ID of Matlab session
GET_SHELL shell of the current user
GET_USERNAME tell username of current user (requires: java)
H4EXISTS check if object exists in HDF4 file
H4SIZE get size (shape) of a HDF4 variable
H4VARIABLES get HDF4 dataset names
H5CREATE_GROUP create HDF5 group
H5EXISTS check if object exists
H5GET_VERSION get version of HDF5 library as a string
H5SAVE save data to HDF5 file
H5SAVE_EXIST write data to existing HDF5 dataset
H5SAVE_NEW Save a variable to an new HDF5 dataset
H5SIZE get shape of HDF5 variable
H5VARIABLES get HDF5 dataset names
HANDLE2FILENAME Convert a file handle to a filename (requires: java)
HARD_LINK_COUNT get the number of hard links to a file (requires: java)
HAS_JAVA detect if JVM is available (requires: java)
HOMEDIR get user home directory
HOSTNAME get hostname of local machine (requires: java)
INI2STRUCT Parses .ini file
IS_ABSOLUTE is path absolute
IS_ADMIN is the process run as root / admin (requires: mex)
IS_CHAR_DEVICE is path a character device (requires: mex)
IS_EXE is file executable
IS_PARALLEL_WORKER being executed by Parallel Computing Toolbox?
IS_PREFIX is prefix a prefix of path?
IS_READABLE is file readable
IS_REGULAR_FILE check if path is a regular file (requires: java)
IS_ROSETTA on Apple Silicon via Rosetta (optional: mex)
IS_SUBDIR is subdir a subdirectory of dir?
IS_SYMLINK is path a symbolic link (optional: mex)
IS_URL is true if the string is a URL.
IS_WRITABLE is path writable
IS_WSL detect if running under WSL (optional: mex)
ISCYGWIN Detect if running under Cygwin
ISINTERACTIVE tell if being run interactively
ISOCTAVE Detects if this is GNU Octave
JAVA_API Java API version (requires: java)
JAVA_VENDOR get vendor of Java Virtual Machine (requires: java)
JAVA_VERSION get version of Java Virtual Machine (requires: java)
JOIN join two paths with posix file separator
LEN get length of character or string
MAKEDIR make dtory and check for success
MD5SUM compute MD5 hash of file (requires: java)
NCEXISTS check if variable exists in NetCDF4 file
NCSAVE save data to NetCDF4 file
NCSAVE_EXIST save a variable to a NetCDF4 existing dataset
NCSAVE_NEW Save a variable to an new NetCDF4 dataset
NCSIZE get size (shape) of a NetCDF4 variable
NCVARIABLES get NetCDF dataset names
NORMALIZE remove redundant elements of path (optional: mex)
NULL_FILE get null file path
OS_VERSION Get operating system name and version. (requires: java)
PARENT parent directory of path (optional: mex)
POSIX posix format of path with '/' separator
PROXIMATE_TO relative path to base (requires: mex)
RAM_FREE get free physical RAM (requires: java)
RAM_TOTAL get total physical RAM (requires: java)
READ_SYMLINK read symbolic link
RELATIVE_TO relative path to base (requires: mex)
RESOLVE resolve path
ROOT get root path
ROOT_NAME get root name
SAMEPATH is path the same
SET_MODTIME set modification time of path (requires: java)
SET_PERMISSIONS set path permissions (requires: mex)
SHA256SUM compute sha256 hash of file (requires: java)
STEM filename without directory or suffix
SUBPROCESS_RUN run process for Matlab only (requires: java)
SUBPROCESS_RUN_OCTAVE run process for GNU Octave only (requires: java)
SUFFIX last suffix of filename
TOUCH create file if not exists, else update modification time
UNLINK delete file or empty directory (requires: mex)
VERSION_ATLEAST compare two string verions: major.minor.rev.patch
WHICH find executable in fpath or env var PATH
WINDOWS_SHORTNAME Retrieves the Windows short name (optional: mex)
WITH_SUFFIX switch file extension