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 slguidstr
Home > sltoolbox > utils_ex > slguidstr.m

slguidstr

PURPOSE ^

SLGUIDSTR Converts a guid to a string

SYNOPSIS ^

function str = slguidstr(gid)

DESCRIPTION ^

SLGUIDSTR Converts a guid to a string 

 $ Syntax $
   - str = slguidstr(gid)

 $ Description $
   - str = slguidstr(gid) converts a GUID represented by a 1 x 16 uint8
     array to a string in Win32 Registry Format.

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

CROSS-REFERENCE INFORMATION ^

This function calls:
  • slisguid SLISGUID Judges whether the input can represent a GUID
This function is called by:
  • edl_go EDL_GO The Top interface for doing experiments in EDL

SOURCE CODE ^

0001 function str = slguidstr(gid)
0002 %SLGUIDSTR Converts a guid to a string
0003 %
0004 % $ Syntax $
0005 %   - str = slguidstr(gid)
0006 %
0007 % $ Description $
0008 %   - str = slguidstr(gid) converts a GUID represented by a 1 x 16 uint8
0009 %     array to a string in Win32 Registry Format.
0010 %
0011 % $ History $
0012 %   - Created by Dahua Lin, on Aug 12nd, 2006
0013 %
0014 
0015 if ~slisguid(gid) 
0016     error('sltoolbox:invalidarg', ...
0017         'The input variable should be a GUID');
0018 end
0019 
0020 numpat = '%02X';
0021 
0022 str = sprintf('%s-%s-%s-%s-%s', ...
0023     sprintf(numpat, gid(1:4)), ...
0024     sprintf(numpat, gid(5:6)), ...
0025     sprintf(numpat, gid(7:8)), ...
0026     sprintf(numpat, gid(9:10)), ...
0027     sprintf(numpat, gid(11:16)) ...
0028     );
0029 
0030 
0031

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

Contact us at files@mathworks.com