diff options
| author | alex <aletu130@student.liu.se> | 2019-10-20 15:42:42 +0200 |
|---|---|---|
| committer | alex <aletu130@student.liu.se> | 2019-10-20 15:42:42 +0200 |
| commit | 7978f8c42029b59e479ec918b67d968b1385081c (patch) | |
| tree | 04840aaf2a896a65c8cd2005fcc2019c96f0a6fb /Kod/bilbana/Graph/segment_time_graph.m | |
| parent | 6df379fff94b917a1f20f9b7ce19b38d139cfffc (diff) | |
| download | tfyy51-7978f8c42029b59e479ec918b67d968b1385081c.tar.gz | |
Implementera Albin
Att göra
- Räkna snitt på alla värden istället för att första sista raden
- Ev. använd inte mean() över huvud taget
Diffstat (limited to 'Kod/bilbana/Graph/segment_time_graph.m')
| -rw-r--r-- | Kod/bilbana/Graph/segment_time_graph.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Kod/bilbana/Graph/segment_time_graph.m b/Kod/bilbana/Graph/segment_time_graph.m index f88c836..602938b 100644 --- a/Kod/bilbana/Graph/segment_time_graph.m +++ b/Kod/bilbana/Graph/segment_time_graph.m @@ -1,15 +1,15 @@ -function [] = segment_time_graph(seg_time,track) +function [] = segment_time_graph(seg_time, track) %SEGMENT_TIME_GRAPH Snittid för varje segment. - -avr_seg_time = mean(seg_time); -subplot(20,1,13:20); +seg_time_size = size(seg_time); +avr_seg_time = mean(seg_time(1:(seg_time_size(1) - 1), 1:(seg_time_size(2)))); +subplot(20, 1, 13:20); Plot = bar(avr_seg_time); %Plot.Marker = 'o'; Plot.FaceColor = 'k'; xlabel('Segment'); ylabel('Tid [s]'); -Tit = join(['Medeltid/segment bana',string(track)]); -title(Tit); +tit = join(['Medeltid/segment bana',string(track)]); +title(tit); end |
