From 9b4f8212b1d86fb5263009b3d2ad48012048e132 Mon Sep 17 00:00:00 2001 From: Albin Date: Sat, 19 Oct 2019 23:15:07 +0200 Subject: Klar med plottar --- Kod/bilbana/Graph/segment_time_graph.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Kod/bilbana/Graph/segment_time_graph.m (limited to 'Kod/bilbana/Graph/segment_time_graph.m') diff --git a/Kod/bilbana/Graph/segment_time_graph.m b/Kod/bilbana/Graph/segment_time_graph.m new file mode 100644 index 0000000..f88c836 --- /dev/null +++ b/Kod/bilbana/Graph/segment_time_graph.m @@ -0,0 +1,15 @@ +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); + +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); +end + -- cgit v1.2.1 From 7978f8c42029b59e479ec918b67d968b1385081c Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 20 Oct 2019 15:42:42 +0200 Subject: Implementera Albin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Kod/bilbana/Graph/segment_time_graph.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Kod/bilbana/Graph/segment_time_graph.m') 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 -- cgit v1.2.1