-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpecialVehicleMaxEvents.m
52 lines (33 loc) · 1.38 KB
/
SpecialVehicleMaxEvents.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
clear, clc
load('WIMYearlyMaxQSum')
Years = unique(YearlyMax.Year);
Stations = unique(YearlyMax.Station);
Widths = unique(YearlyMax.Width);
ClassTs = unique(YearlyMax.ClassT);
% "All", "Class", "ClassOW"
count = 0;
%SaveCase = table();
for i = 1:length(Years)
for j = 1:length(Stations)
for k = 1:length(Widths)
if YearlyMax.MaxLE(YearlyMax.Year == Years(i) & YearlyMax.Station == Stations(j) & YearlyMax.Width == Widths(k) & YearlyMax.ClassT == "ClassOW") > YearlyMax.MaxLE(YearlyMax.Year == Years(i) & YearlyMax.Station == Stations(j) & YearlyMax.Width == Widths(k) & YearlyMax.ClassT == "Class")
count = count + 1;
%YearlyMax(YearlyMax.Year == Years(i) & YearlyMax.Station == Stations(j) & YearlyMax.Width == Widths(k),:)
SaveCase(count).Year = Years(i);
SaveCase(count).Station = Stations(j);
SaveCase(count).Width = Widths(k);
end
end
end
end
Del = true(length(SaveCase),1);
for i = 2:length(SaveCase)
if SaveCase(i).Year == SaveCase(i-1).Year && SaveCase(i).Station == SaveCase(i-1).Station
Del(i-1) = false;
end
end
N = [[SaveCase.Year]' [SaveCase.Station]' [SaveCase.Width]'];
%SaveCase
N = N(Del,:);
ClassOWApercu = N;
save('ClassOWApercu','ClassOWApercu')