How to get the name of the computer under MATLAB?
83 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mr M.
am 29 Apr. 2018
Beantwortet: scivision
am 18 Sep. 2024
I want to register the name of the computer where my script is running. Is it possible to get this info?
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 29 Apr. 2018
[ret, name] = system('hostname')
name = getenv('COMPUTERNAME'); % for windows
name = getenv('HOSTNAME')
1 Kommentar
nan
am 18 Aug. 2020
This does not work when running a VPN on a Mac (running Catalina); the hostname is replaced by an IP address.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!