How to get the name of the computer under MATLAB?
99 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mr M.
le 29 Avr 2018
Réponse apportée : scivision
le 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 commentaires
Réponse acceptée
Ameer Hamza
le 29 Avr 2018
[ret, name] = system('hostname')
name = getenv('COMPUTERNAME'); % for windows
name = getenv('HOSTNAME')
1 commentaire
nan
le 18 Août 2020
This does not work when running a VPN on a Mac (running Catalina); the hostname is replaced by an IP address.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!