Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gps-modeling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martina Maggio
gps-modeling
Commits
d1a3ce73
Commit
d1a3ce73
authored
Feb 27, 2019
by
Claudio Mandrioli
Browse files
Options
Downloads
Patches
Plain Diff
moved plotting code in tradeoff experiments to separate script
parent
ff328232
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/plot_tradeoff.m
+14
-0
14 additions, 0 deletions
matlab/plot_tradeoff.m
matlab/run_many_cycling.m
+8
-18
8 additions, 18 deletions
matlab/run_many_cycling.m
with
22 additions
and
18 deletions
matlab/plot_tradeoff.m
0 → 100644
+
14
−
0
View file @
d1a3ce73
%% Plot data for tradeoff evaluation
%vector of RGB colors for plotting for the different P references
color
=
[[
0.7
,
0.0
,
0.0
];[
0.0
,
0.7
,
0.0
];[
0.7
,
0.0
,
0.7
];[
0.0
,
0.0
,
0.7
];[
0.0
,
0.7
,
0.7
];[
0.7
,
0.7
,
0.0
]];
%actual plot
figure
hold
on
xlabel
(
'energy'
)
ylabel
(
'error'
)
title
(
'cycling energy accuracy tracking trade-off'
)
grid
for
j
=
1
:
length
(
P_treshold
)
scatter
(
energy
(:,
j
),
error
(:,
j
),
20
,
color
(
j
,:),
'o'
,
'filled'
)
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
matlab/run_many_cycling.m
+
8
−
18
View file @
d1a3ce73
...
...
@@ -4,19 +4,18 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Load data
disp
(
'Load
s
data'
)
disp
(
'Load data'
)
load
(
'cycling_input_data'
);
%% Load filter settings
disp
(
'Load
s
settings'
)
disp
(
'Load settings'
)
settings
=
get_settings_cycling
();
%vector of RGB colors for plotting for the different P references
color
=
[[
0.7
,
0.0
,
0.0
];[
0.0
,
0.7
,
0.0
];[
0.7
,
0.0
,
0.7
];[
0.0
,
0.0
,
0.7
];[
0.0
,
0.7
,
0.7
];[
0.7
,
0.7
,
0.0
]];
%% Settings for tradeoff evaluation
%vector of refrences for P
P_treshold
=
[
4.0
,
5.0
,
6.0
,
8.0
,
10.0
,
12.0
];
P_treshold
=
[
4.0
,
5.0
];
%
,6.0,8.0,10.0,12.0];
%nubmer of simulations per each P
n_run
=
30
;
n_run
=
1
;
%allocate memory for output
energy
=
zeros
(
n_run
,
length
(
P_treshold
));
error
=
zeros
(
n_run
,
length
(
P_treshold
));
...
...
@@ -33,15 +32,6 @@ for j=1:length(P_treshold)
end
end
%% Plot data
figure
hold
on
xlabel
(
'energy'
)
ylabel
(
'error'
)
title
(
'cycling energy accuracy tracking trade-off'
)
grid
for
j
=
1
:
length
(
P_treshold
)
scatter
(
energy
(:,
j
),
error
(:,
j
),
20
,
color
(
j
,:),
'o'
,
'filled'
)
end
\ No newline at end of file
%% Plot results
disp
(
'Plot results'
)
plot_tradeoff
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment