Code covered by the BSD License  

5.0

5.0 | 1 rating Rate this file 15 Downloads (last 30 days) File Size: 2.42 KB File ID: #13652
image thumbnail

CreateGuid MEX

by

 

13 Jan 2007 (Updated )

MEX to create a Globally Unique Identifier GUID

| Watch this File

File Information
Description

A MEX file to calculate a GUID. A Globally Unique Identifier or GUID is a pseudo-random number used in software applications. Each generated GUID is "statistically guaranteed" to be unique. This is based on the simple principle that the total number of unique keys ( or ) is so large that the possibility of the same number being generated twice is virtually zero.

To compile:

 mex CreateGuid.c rpcrt4.lib

I also tried to implement with .net but I found it to be much slower when needing a lot of GUIDs.

MATLAB release MATLAB 7.2 (R2006a)
Other requirements Tested under Microsoft Visual Studio 6. I will test and/or develop this under MAC OSX and VS 7.1 when I have the resources available.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
04 Nov 2011 Tom

Thanks Joseph ... your solution worked for me (after casting to char)

char(java.util.UUID.randomUUID)

19 Oct 2011 Joseph Burgel

Had some issues compiling this in Windows 7 an ML 2010a. After a little digging, I found:
x = java.util.UUID.randomUUID()
which worked fine for my purpose. Thanks.

14 Aug 2008 Steve Hoelzer

Worked as advertised and really useful. I compiled it with MS Visual C++ .NET 2003. Could use a readme file or a few more comments in the code.

Contact us