Instrument Control Toolbox | ![]() ![]() |
Return network name or network address
Syntax
name = resolvehost('host')
[name,address] = resolvehost('host')
out = resolvehost('host','returntype
')
Arguments
'host' |
The network name or network address of host. |
' returntype ' |
Return either the name or address of host |
name |
Network name of host |
address |
Network address of host |
Description
name = resolvehost('host')
returns the name of the specified host. You can specify host
as either a network name or a network address. For example, www.mathworks.com
is a network name and 144.212.100.10
is a network address.
[name,address] = resolvehost('host')
returns the name and address of the specified host.
out = resolvehost('host','
returns the host name if returntype
')
returntype
is name
and returns the host address if returntype
is address
.
Example
The following commands show how you can return the host name and address.
[name,address] = resolvehost('144.212.100.10') name = resolvehost('144.212.100.10','name') address = resolvehost('www.mathworks.com','address')
Functions
![]() | record | save | ![]() |