View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

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

CreateGuid MEX



13 Jan 2007 (Updated )

MEX to create a Globally Unique Identifier GUID

| Watch this File

File Information

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

Tom (view profile)

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


Comment only
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.

Comment only
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