Home > vbmeg > functions > common > utility > vb_get_username.m

vb_get_username

PURPOSE ^

return current user name of MATLAB.

SYNOPSIS ^

function username = vb_get_username()

DESCRIPTION ^

 return current user name of MATLAB.
 [USAGE]
    username = vb_get_username();
 [IN]
    none
 [OUT]
    username : username

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function username = vb_get_username()
0002 % return current user name of MATLAB.
0003 % [USAGE]
0004 %    username = vb_get_username();
0005 % [IN]
0006 %    none
0007 % [OUT]
0008 %    username : username
0009 
0010 username = '';
0011 
0012 if ispc
0013     username = getenv('USERNAME');
0014 else
0015     username = getenv('USER');
0016 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005