diff options
| author | Albin <albwa833@student.liu.se> | 2019-10-25 09:51:28 +0200 |
|---|---|---|
| committer | Albin <albwa833@student.liu.se> | 2019-10-25 09:51:28 +0200 |
| commit | 14fdcb87f762f0c72ccc7324ba9f84625ec370a2 (patch) | |
| tree | c16487e9de49215445fe51d207c76488af1b1b3b /Kod | |
| parent | b7771e858cb8bb753521792d828d7a5f47d175cd (diff) | |
| download | tfyy51-14fdcb87f762f0c72ccc7324ba9f84625ec370a2.tar.gz | |
Bugfix seg_time_graph
Diffstat (limited to 'Kod')
| -rw-r--r-- | Kod/bilbana/Graph/graphs_test.m | 6 | ||||
| -rw-r--r-- | Kod/bilbana/Graph/segment_time_graph.m | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Kod/bilbana/Graph/graphs_test.m b/Kod/bilbana/Graph/graphs_test.m index 451bbf1..ddc3b64 100644 --- a/Kod/bilbana/Graph/graphs_test.m +++ b/Kod/bilbana/Graph/graphs_test.m @@ -5,10 +5,10 @@ A = [3.9,1.1,2.2,1.8,1.4,3.9,1.5,3.4,1.4; 4.0,1.1,2.2,1.8,1.4,3.6,1.5,3.4,1.4; 4.1,1.1,2.2,1.8,1.4,3.8, 0, 0, 0]; B = [3.9,1.1,2.2,1.8,1.4,3.9, 0, 0, 0]; -C = [3.9,1.1,2.2,1.8,1.4,3.9,1.5,3.4,1.4; - 4.2,1.1,2.2,1.8,1.4,3.4, 0, 0, 0]; +C = [3.9,1.1,2.2,1.8,1.4,3.9,1.5,3.1,1.0; + 4.1,1.1,2.2,1.8,1.4,3.4, 0, 0, 0]; car1.seg_times = C; car1.lap_times = [14.1,13.8,14.15,13.9,14.1,14]; ref_lap_time = 14; %% Actual test -graphs(car1.lap_times,ref_lap_time,car1.seg_times,7)
\ No newline at end of file +graphs(car1.lap_times,ref_lap_time,car1.seg_times,5)
\ No newline at end of file diff --git a/Kod/bilbana/Graph/segment_time_graph.m b/Kod/bilbana/Graph/segment_time_graph.m index 9ee4b8c..5100693 100644 --- a/Kod/bilbana/Graph/segment_time_graph.m +++ b/Kod/bilbana/Graph/segment_time_graph.m @@ -13,7 +13,7 @@ divide_by_n = ones(1,seg_time_size(2)); %% Summera seg_time om seg_time ~= 0 for r = 1:seg_time_size(1) if r == 1 - avr_seg_time(1:seg_time_size(2)) = seg_times(1:seg_time_size(2)); + avr_seg_time(1,1:seg_time_size(2)) = seg_times(1,1:seg_time_size(2)); else for c = 1:seg_time_size(2) x = seg_times(r,c); |
