Environment variable


getenv 'name'
N = getenv('name')


getenv 'name' searches the underlying operating system environment list for a string of the form name=value, where name is the input string. If found, MATLAB® returns the string value. If the specified name cannot be found, an empty matrix is returned.

On UNIX® platforms, the shell you use to start MATLAB determines the operating system environment. For example, starting MATLAB on a Mac platform from the Applications folder creates a different shell environment from launching MATLAB from Terminal.

N = getenv('name') returns value to the variable N.


os = getenv('OS')
os =

See Also

| | | |

Was this topic helpful?