-
Notifications
You must be signed in to change notification settings - Fork 1
/
ManupulateDataForDebugging.m
92 lines (71 loc) · 2.96 KB
/
ManupulateDataForDebugging.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
function ManipulateDataForDebugging()
global newdataset alldataset indFrictionValue
%% Prep data for plotting (not used, for debugging)
removelowerpointsnot = 0;
tempnewdataset = newdataset;
tempalldataset = alldataset;
newdataset(newdataset(:,indFrictionValue)==0,indFrictionValue) = -10;
alldataset(alldataset(:,indFrictionValue)==0,indFrictionValue) = -10;
if removelowerpointsnot == 1
newdataset = tempnewdataset;
alldataset = tempalldataset;
end
%%---------------------------------------
% For report (not used)
%----------------------------------------
% Plot friction and temp (for report and debugging)
%%%%%%%%%%hold on
%plot(newdataset(:,1),newdataset(:,indFrictionValue),'*r','markersize',10)
%plot(newdataset(:,1),alldataset(:,indFrictionValue),'omagenta')
%%%%%%%%%%%%plot(newdataset(:,1),newdataset(:,ind1PrevFrictionValue),'ored')
% Plot temp from VV
% s = normc(newdataset(:,19))
% norms = s - min(s(:))
% norms = norms ./ max(norms(:))
%plot(newdataset(:,1),norms,'--g')
% Plot temp from SMHI
% s = normc(newdataset(:,9))
% norms = s - min(s(:))
% norms = norms ./ max(norms(:))
%plot(newdataset(:,1),norms,'--y')
% Plot humidity
%%%%%%s = normc(newdataset(:,24));
%%%%%%norms = s - min(s(:));
%%%%%%norms = norms ./ max(norms(:));
%%%%%%%%plot(newdataset(:,1),norms,'--black')
% Plot regn
%%%%%%%%%%%plot(newdataset(:,1),newdataset(:,indRainVV),'-b')
%%%%%%datetick('x','yyyy-mm-dd','keepticks')
% Plot snow
%%%%%%%%%%5plot(newdataset(:,1),newdataset(:,indSnowVV),'color','[0.3 0.3 1.0]')
%datetick('x','yyyy-mm-dd','keepticks')
%set(gca, 'XTick', newdataset(:,1:6:end));
%%%%%%%%%%%tickDates = newdataset(1,1):1:newdataset(end,1); %// creates a vector of tick positions
%%%%%%%%%%%%set(gca, 'XTick' , tickDates , 'XTickLabel' , datestr(tickDates,'yyyy-mm-dd') )
%xticklabel_rotate;
% NumTicks = 300;
% L = get(gca,'XLim');
% set(gca,'XTick',linspace(L(1),L(2),NumTicks))
% set(gca,'XMinorTick','on','YMinorTick','on')
% Plot wiperspeed
%plot(newdataset(:,1),newdataset(:,49),'-c')
%%%%%%hold off
%legend('Friction values (Segment)','Friciton values (Region)','SMHI Temperature','VV Temperature,','Humidity','Rainfall')
%%%%%%legend('Friction values','Humidity,','Rain')
%% Plot temperatures (for report)
%%%%%%%%hold off
% Plot temp from VV
%%%%%%%%%%%%%%plot(newdataset(:,1),newdataset(:,19),'-g')
%%%%%%%%hold on
% Plot temp from SMHI
%%%%%%%%%plot(newdataset(:,1),newdataset(:,9),'-b')
% Plot temp from car data
%%%%%%%%%newdataset(newdataset(:,indTempCar) == 0,indTempCar) = -100;
%%%%%%%%%%%%%plot(newdataset(:,1),newdataset(:,indTempCar),'or')
%%%%%%%%ylabel('Temperature')
%%%%%%%%legend('Vägverket','SMHI','From vehicles in the region')
%%%%%%%%datetick('x','yyyy-mm-dd','keepticks')
%xticklabel_rotate;
%%%%%%%%%%%%%%%tickDates = newdataset(1,1):1:newdataset(end,1); %// creates a vector of tick positions
%%%%%%%%%%%%%set(gca, 'XTick' , tickDates , 'XTickLabel' , datestr(tickDates,'yyyy-mm-dd') );
end