stdlib API
A standard library of functions for Matlab.
Git branch / commit: main e5444f7
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
CPU_COUNT how many CPUs are available
CPU_LOAD get total physical CPU load
CREATE_SYMLINK create symbolic link
DISK_AVAILABLE disk available space (bytes)
DISK_CAPACITY disk total capacity (bytes)
DROP_SLASH drop repeated and trailing slash
EXISTS does path exist
EXPANDUSER expands tilde ~ into user home directory
EXTRACT_ZSTD extract a Zstd archive
FILE_CHECKSUM compute hash of file
FILE_SIZE size in bytes of file
FILENAME file name of path
FILESYSTEM_TYPE tell type of filesystem
GET_MODTIME get path modification time
GET_OWNER owner of file or directory
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
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
HARD_LINK_COUNT get the number of hard links to a file
HAS_JAVA detect if JVM is available
HOMEDIR get user home directory
HOSTNAME get hostname of local machine
INI2STRUCT Parses .ini file
IS_ABSOLUTE is path absolute?
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
IS_ROSETTA is running on Apple Silicon using Rosetta
IS_SUBDIR is subdir a subdirectory of dir?
IS_SYMLINK is path a symbolic link
IS_WRITABLE is path writable
IS_WSL detect if running under WSL
ISCYGWIN Detect if running under Cygwin
ISINTERACTIVE tell if being run interactively
ISOCTAVE Detects if this is GNU Octave
JAVA_API Java API version
JAVA_VENDOR get vendor of Java Virtual Machine
JAVA_VERSION get version of Java Virtual Machine
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
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
NULL_FILE get null file path
OS_VERSION Get operating system name and version.
PARENT parent directory of path
POSIX posix format of path with '/' separator
PROXIMATE_TO proximate path to base
RAM_FREE get free physical RAM
RAM_TOTAL get total physical RAM
READ_SYMLINK read symbolic link
RELATIVE_TO relative path to base
RESOLVE resolve path
ROOT get root path
ROOT_NAME get root name
SAMEPATH is path the same
SET_MODTIME set modification time of path
SHA256SUM compute sha256 hash of file
STEM filename without directory or suffix
SUBPROCESS_RUN run process for Matlab only
SUBPROCESS_RUN_OCTAVE run process for GNU Octave only
SUFFIX last suffix of filename
TOO_OLD check if Matlab older than R2020b or as specified by release "r"
TOUCH create file if not exists, else update modification time
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 (8.3 character) form
WITH_SUFFIX switch file extension