Get environment variable in MATLAB
In this article, we are going to discuss “Getting environment variable”, which can be done using getenv() function. The getenv() function is used to get the operating system environment variable.
value = getenv(name)
Parameters: This function accepts a parameter name parameter.
- name: This is the specified name for which environmental variable is going to be searched.
Return Value: It returns the operating system environment variable.
ans = C:\GFG
Here the getenv() function returns the current environmental variable name “C:\GFG”.
ans = D:\geeksforgeeks\gfg