フィルターのクリア

How to get the name of the computer under MATLAB?

163 ビュー (過去 30 日間)
Mr M.
Mr M. 2018 年 4 月 29 日
コメント済み: nan 2020 年 8 月 18 日
I want to register the name of the computer where my script is running. Is it possible to get this info?

回答 (1 件)

Ameer Hamza
Ameer Hamza 2018 年 4 月 29 日
Check this FEX submission. Or you can simply try following commands
[ret, name] = system('hostname')
name = getenv('COMPUTERNAME'); % for windows
name = getenv('HOSTNAME')
  1 件のコメント
nan
nan 2020 年 8 月 18 日
This does not work when running a VPN on a Mac (running Catalina); the hostname is replaced by an IP address.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by