Commit d1a3ce73 authored by Claudio Mandrioli's avatar Claudio Mandrioli
Browse files

moved plotting code in tradeoff experiments to separate script

parent ff328232
%% 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
......@@ -4,19 +4,18 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Load data
disp('Loads data')
disp('Load data')
load('cycling_input_data');
%% Load filter settings
disp('Loads 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment