How can I compare the results of system('getmac') to a string?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to protect my code by comparing the mac address of the computer.
I can get the mac address:
[E R]=system('getmac');
mac_add=R(160:178)
but I do not know how to convert that to a string so that I can use strcmp. Any ideas?
0 commentaires
Réponse acceptée
Image Analyst
le 7 Déc 2012
mac_add is a string. Maybe it just didn't work with strcmp() because you have a trailing space. Try mac_add=R(160:177) instead. Or maybe you need to use strcmpi() instead.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Low-Level File I/O dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!