return current user name of MATLAB. [USAGE] username = vb_get_username(); [IN] none [OUT] username : username
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