detecting computer ID from matlab
    17 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Mario Trevino
 il 29 Lug 2014
  
    
    
    
    
    Modificato: Star Strider
      
      
 il 29 Lug 2014
            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
0 Commenti
Risposta accettata
  Star Strider
      
      
 il 29 Lug 2014
        
      Modificato: Star Strider
      
      
 il 29 Lug 2014
  
      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.
0 Commenti
Più risposte (1)
  Michael Haderlein
      
 il 29 Lug 2014
        I think that's what you're looking for:  http://www.mathworks.com/matlabcentral/fileexchange/16450-get-computer-name-hostname
0 Commenti
Vedere anche
Categorie
				Scopri di più su Matrix Indexing in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


