Skip to content
Snippets Groups Projects
Verified Commit 05163edb authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

feat: isolate useful plots

parent d0b252c1
No related branches found
No related tags found
No related merge requests found
......@@ -18,12 +18,30 @@ function plotcf(ResData)
OFFSET_STEPS = 20;
INTERESTING_PLOTS = [
0.03, 2, 7.7
0.03, 3, 2.5
0.03, 3, 4.6
0.03, 3.5, 2.5
0.03, 3.5, 4.6
0.03, 3.5, 7.7
0.05, 1.25, 4.6
0.05, 2, 7.7
0.05, 3, 7.7
0.05, 3.5, 2.5
0.05, 3.5, 7.7
0.10, 2.5, 4.6
0.10, 2.5, 7.7
0.10, 3.5, 2.5
0.10, 3.5, 4.6
0.10, 3.5, 7.7
];
% for i = 1: size(ResData,1)
for i = 3
for i = 1:size(ResData, 1)
for j = 1:size(ResData, 2)
if ResData(i, j).Testcase.airspeed ~= 0 % No need to plot when cF = 0
if isinteresting(ResData(i, j), INTERESTING_PLOTS)
expParam = sprintf('d = %0.2f, f = %0.2f, V = %0.1f', ...
ResData(i, j).Testcase.dx, ...
ResData(i, j).Testcase.freq, ...
......@@ -91,3 +109,25 @@ function setgca()
xlim([-180, 180]);
grid on;
end
function bool = isinteresting(ResData, interestingPlots)
% ISINTERESTING Return true if a result is listed in the interestingPlots array
% No need to plot when cF = 0
if ResData.Testcase.airspeed == 0
bool = false;
return
end
% If no interestingPlots defined, always plot all
if isempty(interestingPlots)
bool = true;
return
end
ResParam = [ResData.Testcase.dx, ...
ResData.Testcase.freq, ...
ResData.Testcase.airspeed];
bool = any(ismember(interestingPlots, ResParam, 'rows'));
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment