-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplot_weight_max_global.m
58 lines (41 loc) · 1.17 KB
/
plot_weight_max_global.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
close all;
clear all;
clc;
%% Path for Matlab functions
addpath ('functions/');
global path;
%path = '/home/philippe/robibio/grimmer_version/output';
path = 'output/single_fast';
global archId;
archId = 7;
global motionId;
motionId = 11;
global epoch;
for archId = 1:14
for motionId = 1:14
epoch = 1;
weight = [];
max_weight = [];
%fprintf("Preparing data...\n\n");
isFile = true;
while (isFile)
filename = sprintf('%s/arch-%d-motion-%d/epoch-%d.mat',path, archId, motionId, epoch);
if (isfile(filename))
load(filename);
%fprintf('Expe %d | Epoch %d | Iter %d | weight = %f kg\n', expe, epoch, iter, data.weight);
weight = [weight; -data.fval];
max_weight = [max_weight; max(weight)];
epoch = epoch + 1;
else
isFile = false;
end
end
fprintf ("%.2f\t", max(max_weight));
end
fprintf ("\n");
end
% figure; hold on;
% plot (weight);
% plot (max_weight);
% grid on;
% title ('Max Weight');