-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_results_n.m
79 lines (63 loc) · 1.5 KB
/
get_results_n.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
function results = get_results_n(fileName, U, Umax, TRatio, n, mDelta, mRatio, m, Pi, scheduler, hwType)
allResults = dlmread(fileName);
results = [];
for rowItr = 1:size(allResults,1)
curRow(1,:) = allResults(rowItr,:);
if ~isempty(U)
if round(curRow(1)*10) ~= round(U*10)
continue;
end
end
if ~isempty(Umax)
if round(curRow(2)*1000) ~= round(Umax*1000)
continue;
end
end
if ~isempty(TRatio)
if round(curRow(3)*10) ~= round(TRatio*10)
continue;
end
end
if ~isempty(n)
if curRow(4) ~= n
continue;
end
end
if ~isempty(mDelta)
if curRow(6) ~= mDelta
continue;
end
end
if ~isempty(mRatio)
m = curRow(5);
mDelta = curRow(6);
mMin = m - mDelta;
curMRatio = m/mMin;
if round(curMRatio*10) ~= round(mRatio*10)
continue;
end
end
if ~isempty(m)
if curRow(5) ~= m
continue;
end
end
if ~isempty(Pi)
if round(curRow(7)*10) ~= round(Pi*10)
continue;
end
end
if ~isempty(scheduler)
if curRow(13) ~= scheduler
continue;
end
end
if ~isempty(hwType)
if curRow(12) ~= hwType
continue;
end
end
% the row satisfies the selection criteria
results = [results; curRow];
end % for rowItr
end