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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의