How to get the name of the computer under MATLAB?
56 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mr M.
el 29 de Abr. de 2018
Respondida: scivision
el 18 de Sept. de 2024
I want to register the name of the computer where my script is running. Is it possible to get this info?
0 comentarios
Respuesta aceptada
Ameer Hamza
el 29 de Abr. de 2018
[ret, name] = system('hostname')
name = getenv('COMPUTERNAME'); % for windows
name = getenv('HOSTNAME')
1 comentario
nan
el 18 de Ag. de 2020
This does not work when running a VPN on a Mac (running Catalina); the hostname is replaced by an IP address.
Más respuestas (1)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!