Get computer name/hostname
Version 1.1.0.0 (1.26 KB) by
Manuel Marin
It provides the computer name where running. Useful for customizing scripts depending on the machine
GETCOMPUTERNAME is a very simple but useful function to get your computer name, i.e. the hostname.
Example:
> mycomputer = getComputerName();
Cite As
Manuel Marin (2023). Get computer name/hostname (https://www.mathworks.com/matlabcentral/fileexchange/16450-get-computer-name-hostname), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14SP3
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Oceanography and Hydrology in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired: getUserName
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.