MATLAB ヘルプ センター
Resolve network host name or IP address
name = resolvehost(host)
name = resolvehost(host,"name")
address = resolvehost(host,"address")
[name,address] = resolvehost(host)
name = resolvehost(host) and name = resolvehost(host,"name") return the name of the specified host, where host is the network name or IP address.
name
host
example
address = resolvehost(host,"address") returns the address of the specified host.
address
[name,address] = resolvehost(host) returns both the name and address of the specified host.
collapse all
Provide an IP address to view the associated host name.
name = resolvehost("144.212.244.17")
name = 'www-ahprod.mathworks.com'
You can specify the optional input argument "name" as well.
"name"
name = resolvehost("144.212.244.17","name")
Specifying the host name instead returns the same host name.
name = resolvehost("www.mathworks.com")
name = 'www.mathworks.com'
Provide a network host name to view the associated IP address. You must include the input argument "address".
"address"
address = resolvehost("en.wikipedia.org","address")
address = '208.80.154.224'
Specifying the IP address instead returns the same IP address.
address = resolvehost("208.80.154.224","address")
You can view both the network name and IP address of a specified host. You can specify either the name or IP address. In this example, the resolvehost function returns the name and address from the provided host name.
resolvehost
[name,address] = resolvehost("en.wikipedia.org")
name = 'en.wikipedia.org'
You can also specify the IP address instead.
[name,address] = resolvehost("208.80.154.224")
name = 'text-lb.eqiad.wikimedia.org'
Network host name or IP address, specified as a character vector or string scalar.
Data Types: char | string
char
string
Network name, returned as a character vector.
IP address, returned as a character vector.
Introduced before R2006a
tcpclient | udpport
tcpclient
udpport
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ