Wednesday, April 18, 2012

Get Machinename in Matlab

I'm using a script that sends a tweet every once in a while, and I needed to localize this msg with the host machine name, so I can know from where it comes from.

The host name can be reached by:

if ispc
machinename = getenv('COMPUTERNAME');
machinename = getenv('HOSTNAME');

No comments: