Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of slguid
Home > sltoolbox > utils_ex > slguid.m

slguid

PURPOSE ^

SLGUID Generates a GUID (Global Unique Identifier)

SYNOPSIS ^

function gid = slguid()

DESCRIPTION ^

SLGUID Generates a GUID (Global Unique Identifier)

 $ Syntax $
   - gid = slguid()

 $ Description $
   - gid = slguid() generates a 128-bit GUID, which is represented by
     a 16 x 1 UINT8 array. If it succeeds, an 1 x 16 array is returned
     otherwise an error is reported.

 $ Remarks $
   - In current implementation, it is based on win32guid_core mex
     cpp function, thus only Win32 or compatible platform is supported.

 $ History $
   - Created by Dahua Lin, on Aug 12, 2006

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:
  • edl_go EDL_GO The Top interface for doing experiments in EDL

SOURCE CODE ^

0001 function gid = slguid()
0002 %SLGUID Generates a GUID (Global Unique Identifier)
0003 %
0004 % $ Syntax $
0005 %   - gid = slguid()
0006 %
0007 % $ Description $
0008 %   - gid = slguid() generates a 128-bit GUID, which is represented by
0009 %     a 16 x 1 UINT8 array. If it succeeds, an 1 x 16 array is returned
0010 %     otherwise an error is reported.
0011 %
0012 % $ Remarks $
0013 %   - In current implementation, it is based on win32guid_core mex
0014 %     cpp function, thus only Win32 or compatible platform is supported.
0015 %
0016 % $ History $
0017 %   - Created by Dahua Lin, on Aug 12, 2006
0018 %
0019 
0020 if ~strcmpi(computer(), 'PCWIN') && ~strcmpi(computer(), 'PCWIN64')
0021     error('sltoolbox:notsupportplatform', ...
0022         'Only win32 or x64 platform is supported for slguid');
0023 end
0024 
0025 [b, gid] = win32guid_core();
0026 
0027 if ~b
0028     error('sltoolbox:rterror', ...
0029         'Fail to generate GUID');
0030 end
0031 
0032     
0033 
0034

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com