hostname.m

Report the name of computer on which Matlab is currently running.
1.6K Downloads
Updated 14 May 2009

View License

This function reports the name of computer on which Matlab is currently running, and works under multiple operating systems.

Cite As

Phillip M. Feldman (2024). hostname.m (https://www.mathworks.com/matlabcentral/fileexchange/24096-hostname-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

I updated this to support both the newer and older Mac environments.

1.2.0.0

Added one line of code to strip any trailing blanks from the result.

1.1.0.0

minor modification to support Mac

1.0.0.0