diff --git a/utils/analysis/plotcf.m b/utils/analysis/plotcf.m index a3b54f1e197074a846e705c4818cba1b6fc25d18..d00f1fd3c37d9d906c62e6e60495ae1b43bed135 100644 --- a/utils/analysis/plotcf.m +++ b/utils/analysis/plotcf.m @@ -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