Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_matlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Merge requests
!13
PreRelease_V0.1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
PreRelease_V0.1
development
into
master
Overview
3
Commits
76
Pipelines
1
Changes
28
Merged
Lemmer, Jan
requested to merge
development
into
master
3 years ago
Overview
3
Commits
76
Pipelines
1
Changes
28
Expand
Try to merge now
0
0
Merge request reports
Compare
master
version 1
e364a277
3 years ago
master (base)
and
latest version
latest version
e364a277
76 commits,
3 years ago
version 1
e364a277
76 commits,
3 years ago
28 files
+
983
−
240
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
28
Search (e.g. *.vue) (Ctrl+P)
fcn_core
/CreateID.m
→
+PlotID
/CreateID.m
+
24
−
18
Options
function
[
ID
]
=
CreateID
(
method
)
%CreateID Creates an Identifier (char)
% Creates an (sometimes unique) identifier based on the selected method
% if no method is selected method 1 will be the default method
arguments
method
(
1
,
1
)
{
mustBeNumeric
}
=
1
end
switch
method
case
1
% UNIX Time in seconds as HEX
ID
=
posixtime
(
datetime
(
'now'
));
%get current Unix time
ID
=
dec2hex
(
int32
(
ID
));
% get it as Hex
pause
(
0.5
);
%Pausing for unique IDs
otherwise
error
(
'The requested method is not defined yet'
);
end
end
function
[
ID
]
=
CreateID
(
method
)
%CreateID Creates an identifier (char)
% Creates an (sometimes unique) identifier based on the selected method
% if no method is selected method 1 will be the default method
arguments
method
(
1
,
1
)
{
mustBeNumeric
}
=
1
end
switch
method
case
1
% UNIX Time in seconds as HEX
ID
=
posixtime
(
datetime
(
'now'
));
%get current Unix time
ID
=
dec2hex
(
int32
(
ID
));
% get it as Hex
pause
(
1
);
%Pausing for unique IDs
case
2
% random UUID from Java 128 bit
%Static factory to retrieve a type 4 (pseudo randomly generated) UUID.
% The UUID is generated using a cryptographically strong pseudo
% random number generator.
temp
=
java
.
util
.
UUID
.
randomUUID
;
ID
=
temp
.
toString
;
otherwise
error
(
'The requested method is not defined yet'
);
end
end
Loading