setenv
Set environment variable
Description
setenv(
sets the value of an operating system environment variable. If
name
,val
)name
exists as an environment variable, then
setenv
replaces its current value with
val
. If name
does not exist, then
setenv
creates an environment variable called
name
and assigns val
to it.
setenv
passes name
and
val
to the operating system unchanged. Special characters,
such as ;
, /
, :
,
$
, and %
, are unexpanded in
val
.
A process launched using the MATLAB®
system
, unix
, dos
, or
!
function reads the values assigned to variables using the
setenv
function.
setenv(
assigns a null value to
name
)name
. This syntax is equivalent to
setenv(name,"")
. On most UNIX® platforms, an environment variable can exist with an empty value
(""
). On the Microsoft®
Windows® platform, this syntax is equivalent to removing the variable.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced before R2006a