MatrixBerryCore
getuserhost.m
Go to the documentation of this file.
1 function [userName,hostName]=getuserhost()
2 persistent hostNameCached userNameCached
3 if nargout>1
4  if isempty(hostNameCached)
5  [~,~,hostNameCached]=mxberry.system.getpidhost();
6  end
7  hostName=hostNameCached;
8 end
9 if isempty(userNameCached)
10  userNameCached=char(java.lang.System.getProperty('user.name'));
11 end
12 userName=userNameCached;
function getpidhost()
GETPIDHOST returns process id (PID) of current Matlab instance along with a host name it is running o...
function getuserhost()