Code covered by the BSD License  

Highlights from
getUserName

getUserName

by

 

Returns the user name or id, as informed by the operating system.

getUserName ()
function name = getUserName ()
    if isunix() 
        name = getenv('USER'); 
    else 
        name = getenv('username'); 
    end
end

Contact us