How can I get operating system MAC address for a Windows Machine from MATLAB 7.14 (R2012a)?

18 visualizaciones (últimos 30 días)
I would like to find the exact MAC address from MATLAB for my Windows Machine because I want to use it been stored as a variable.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 17 de Sept. de 2013
In order to get MAC information, you can use the Windows command line command 'getmac', and use MATLAB function 'dos' to execute DOS command in MATLAB.
The link below describes this function.
web([docroot '/techdoc/ref/dos.html'])
Using the output of this command, you can parse the resulting string output to get MAC address.
For instance:
[status,result] = dos('getmac');
mac = result(160:176);

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by