generate a unique ID
88 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I have a function to generate packets (randomly) , and I want to affect to every generated packet a unique ID (an integer for example).
How can I do this in the simplest way ? Because I don't want to complicate more my simulator.
Thanks in advance.
0 个评论
回答(2 个)
Gareth
2018-11-20
This has already been asked:
temp = java.util.UUID.randomUUID;
myuuid = temp.toString;
disp(myuuid)
0 个评论
Andrei Veldman
2022-1-19
编辑:Andrei Veldman
2022-1-19
...or, using pure Matlab:
[~,guid] = fileparts(tempname)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!