function name = getComputerName()
% GETCOMPUTERNAME returns the name of the computer (hostname)
% name = getComputerName()
%
% WARN: output string is converted to lower case
%
%
% See also SYSTEM, GETENV, ISPC, ISUNIX
%
% m j m a r i n j (AT) y a h o o (DOT) e s
% (c) MJMJ/2007
%
[ret, name] = system('hostname');
if ret ~= 0,
if ispc
name = getenv('COMPUTERNAME');
else
name = getenv('HOSTNAME');
end
end
name = lower(name);