MATLAB Answers

To associate a routine to only one PC

18 views (last 30 days)
Mauro Colombano
Mauro Colombano on 24 Sep 2020 at 14:48
Commented: Star Strider on 24 Sep 2020 at 17:04
I would like to ask you for one or more commands that can read data that are only typical of one PC (e.g. the PC name, or its mac-address..).
Thanks a lot for your help

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 24 Sep 2020 at 15:44
For Windows systems, one option could be to do what MathWorks does, and use the ‘C:\’ volume sedrial number:
[s,cmdout] = system('vol');
SN = cmdout(end-9:end-1)
The ‘SN’ variable is a (1x9) character array.

  4 Comments

Show 1 older comment
Star Strider
Star Strider on 24 Sep 2020 at 16:18
My pleasure!
I would use it with the strcmp function.
Mauro Colombano
Mauro Colombano on 24 Sep 2020 at 16:31
As I did, thanks!
When I'll have checked with my colleagues wether it works, I will accept the answer
Best Regards!
Star Strider
Star Strider on 24 Sep 2020 at 17:04
My pleasure!
Thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by