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
!1
Add Link-replacement feature
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add Link-replacement feature
dev/feature/replaceLink
into
master
Overview
3
Commits
13
Pipelines
0
Changes
16
Merged
Hock, Martin
requested to merge
dev/feature/replaceLink
into
master
3 years ago
Overview
3
Commits
13
Pipelines
0
Changes
16
Expand
Closes
#6 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
07947c3b
13 commits,
3 years ago
16 files
+
403
−
101
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
16
Search (e.g. *.vue) (Ctrl+P)
CI_files/default_test.m
0 → 100644
+
66
−
0
Options
function
[
result
]
=
default_test
()
%UNTITLED2 This is a simple test if Plot ID works for the default settings
% Detailed explanation goes here
clear
;
clc
;
close
all
;
addpath
(
'./fcn_core'
,
'./fcn_help'
);
ProjectID
=
'Test01'
;
%% Data
% some random data
x
=
linspace
(
0
,
7
);
y
=
rand
(
1
,
100
)
+
2
;
dataset1
=
'test_data.mat'
;
save
(
'CI_files/test_data.mat'
,
'x'
,
'y'
);
% some data as .h5
x1
=
linspace
(
0
,
2
*
pi
);
y1
=
sin
(
x1
)
+
2
;
% define file path & name
fpath
=
"CI_files/testdata_2.h5"
;
dataset2
=
'testdata_2.h5'
;
% create hdf5 file and dataset > write data to hdf5 file / dataset
h5create
(
fpath
,
"/x1"
,
size
(
x1
),
"Datatype"
,
class
(
x1
))
h5create
(
fpath
,
"/y1"
,
size
(
y1
),
"Datatype"
,
class
(
y1
))
h5write
(
fpath
,
"/x1"
,
x1
)
h5write
(
fpath
,
"/y1"
,
y1
)
%% Plotting
fig
(
1
)
=
figure
(
'visible'
,
'off'
);
plot
(
x
,
y
,
'-k'
);
hold
on
plot
(
x1
,
y1
,
'-r'
);
%% Tag the plot
try
[
figs
,
ID
]
=
TagPlot
(
fig
,
ProjectID
);
%% call a dummy function
a
=
1
;
a
=
example_fcn
(
a
);
%% publishing
% The functions needs the file location, the location of the data and the
% figure
path
.
script
=
mfilename
(
'fullpath'
);
% filename of the m.script
% file name of the data
path
.
rdata
=
{
dataset1
,
dataset2
}
;
% don't forget the extension
Publish
(
path
,
ID
,
figs
,
'Location'
,
'CI-Test'
)
% clean up
delete
CI_files
/
export
/
*
CI_files
/
*.
mat
CI_files
/
*.
h5
rmdir
(
'CI_files/export'
,
's'
);
result
=
true
;
clc
;
catch
result
=
false
;
warning
(
'simple_test failed'
);
end
end
Loading