# getenv

## Purpose

Get environment variable.

## Synopsis

`getenv`(`'string'`)

## Description

`getenv('string')` returns the text associated with the environment variable specified by `string`.

## Examples

To get MATLAB's initial search path on a UNIX system

    s = getenv('MATLABPATH')

    s =
        /matlab:/matlab/signal

On other systems you might get

    ------------------------------------------------
    DOS:        \MATLAB;\MATLAB\SIGNAL
    Macintosh:  MyDisk:MATLAB:MyDisk:MATLAB:SIGNAL
    VMS:        DISK1:[MATLAB],DISK1:[MATLAB.SIGNAL]
    ------------------------------------------------

## See Also

    path

## References

See `getenv` in any C library or UNIX reference.

(c) Copyright 1994 by The MathWorks, Inc.