diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-27 21:32:12 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-11-27 21:32:12 +0100 |
| commit | b1ed48d84e04e8d5ae11b0e7138980844245e05c (patch) | |
| tree | 17842e710087196fe95dec575436a7db2a4b479e /Kod/bilbana/yc4/format_seg_times.m | |
| parent | c9191389348f6450a5ad3e224b6a4ff41d090f19 (diff) | |
| download | tfyy51-b1ed48d84e04e8d5ae11b0e7138980844245e05c.tar.gz | |
Kvällsarbete
Jag är hemskt ledsen över hur stor commiten blev.
Diffstat (limited to 'Kod/bilbana/yc4/format_seg_times.m')
| -rw-r--r-- | Kod/bilbana/yc4/format_seg_times.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Kod/bilbana/yc4/format_seg_times.m b/Kod/bilbana/yc4/format_seg_times.m new file mode 100644 index 0000000..5500250 --- /dev/null +++ b/Kod/bilbana/yc4/format_seg_times.m @@ -0,0 +1,20 @@ +function [ seg_times ] = format_seg_times( car ) +%FORMAT_POST_RACE_DATA Summary of this function goes here +% Detailed explanation goes here +seg_times = []; +disp(car.seg_times) +if car.running + for x = 1:size(car.seg_times, 2) + s = 0; + amount = 0; + for y = 1:size(car.seg_times, 1) + if car.seg_times(y, x) ~= 0 + s = s + car.seg_times(y, x); + amount = amount + 1; + end + end + seg_times(x) = s / amount; + end +end +end + |
