detecting computer ID from matlab

17 次查看(过去 30 天)
Hi everyone, I wonder if any of you can tell me how to get the computer ID from within matlab? I want to make a compiled function that will run only on the computer with this ID.... please help

采纳的回答

Star Strider
Star Strider 2014-7-29
编辑:Star Strider 2014-7-29
MATLAB uses the disk volume label for its licensing purposes, so that would probably work in your application as well.
Here is one way to get it:
[s, out] = dos('vol');
sc = strsplit(out,'\n');
VolLbl = sc{2}(end-9:end); % ‘VolLbl’ is a (1x9) char array
This will work on Windows. I don’t have access to a Mac or Linux machine, so I don’t know if this would work with them. You might have to write separate versions for those OSs.

更多回答(1 个)

Michael Haderlein
Michael Haderlein 2014-7-29

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by