Set environment variable
setenv(name,value)
setenv(name)
setenv(
sets the value of an operating system environment variable. If
name
,value
)name
exists as an environment variable, then
setenv
replaces its current value with
value
. If name
does not exist, then
setenv
creates an environment variable called
name
and assigns value
to it.
setenv
passes name
and
value
to the operating system unchanged. Special
characters, such as ;
, /
,
:
, $
, and %
, are unexpanded
and intact in value
.
A process spawned using the MATLAB®
system
, unix
, dos
, or
!
function reads the values assigned to variables using the
setenv
function. You can retrieve any value set with
setenv
by calling
getenv(
.name
)
setenv(
assigns a null value to
name
)name
. This syntax is equivalent to
setenv(name,'')
. On the Microsoft®
Windows® platform, this syntax is equivalent to undefining the variable. On
most UNIX® platforms, it is possible to have an environment variable defined as
empty.