Skip to content

getenv

miscellaneous · scripts/miscellaneous/getenv.m

: val = getenv (name)
: d = getenv ()

Return the value of environment variable name, or an empty character vector when it is not set.

With no arguments, return a dictionary whose keys and values are string scalars for every variable in the process environment (MATLAB R2026a).

When name is a string array or cell array of character vectors, return a string array of the corresponding values.