필터 지우기
필터 지우기

detecting computer ID from matlab

조회 수: 24 (최근 30일)
Mario Trevino
Mario Trevino 2014년 7월 29일
편집: Star Strider 2014년 7월 29일
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에서 Startup and Shutdown에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by