1 function [pidHostStr,pidVal,hostName]=
getpidhost()
2 mxBeanObj=java.lang.management.ManagementFactory.getRuntimeMXBean();
3 pidHostStr=
char(mxBeanObj.getName());
5 resCell=strsplit(pidHostStr,'@');
6 pidVal=str2double(resCell{1});
function getpidhost()
GETPIDHOST returns process id (PID) of current Matlab instance along with a host name it is running o...