|
@@ -49,9 +49,9 @@ function [] = sphear_bf_plot_frequency_response(BF, fmin, fmax, ymin, ymax, Fs,
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
- for m = 1:16
|
|
|
|
|
|
|
+ for m = 1:size(BF, 1)
|
|
|
%% calculate B format frequency responses
|
|
%% calculate B format frequency responses
|
|
|
- for b = 1:4
|
|
|
|
|
|
|
+ for b = 1:size(BF, 2)
|
|
|
if (smooth > 0)
|
|
if (smooth > 0)
|
|
|
bfft(m,b,:) = fastsmooth(20*log10(abs(fft(BF(m,b,:), Nfft))), smooth, 2, 1);
|
|
bfft(m,b,:) = fastsmooth(20*log10(abs(fft(BF(m,b,:), Nfft))), smooth, 2, 1);
|
|
|
else
|
|
else
|
|
@@ -95,7 +95,13 @@ function [] = sphear_bf_plot_frequency_response(BF, fmin, fmax, ymin, ymax, Fs,
|
|
|
semilogx(fr, bfft(m,2,1:end/2), xopts, "linewidth", 1.5);
|
|
semilogx(fr, bfft(m,2,1:end/2), xopts, "linewidth", 1.5);
|
|
|
semilogx(fr, bfft(m,3,1:end/2), yopts, "linewidth", 1.5);
|
|
semilogx(fr, bfft(m,3,1:end/2), yopts, "linewidth", 1.5);
|
|
|
semilogx(fr, bfft(m,4,1:end/2), zopts, "linewidth", 1.5);
|
|
semilogx(fr, bfft(m,4,1:end/2), zopts, "linewidth", 1.5);
|
|
|
- l = legend('W', 'X', 'Y', 'Z');
|
|
|
|
|
|
|
+ if (size(BF, 2) > 4)
|
|
|
|
|
+ semilogx(fr, bfft(m,5,1:end/2), 'r--;U;', "linewidth", 1.5);
|
|
|
|
|
+ semilogx(fr, bfft(m,6,1:end/2), 'b--;V;', "linewidth", 1.5);
|
|
|
|
|
+ l = legend('W', 'X', 'Y', 'Z', 'U', 'V');
|
|
|
|
|
+ else
|
|
|
|
|
+ l = legend('W', 'X', 'Y', 'Z');
|
|
|
|
|
+ end
|
|
|
legend(l, 'location', 'west');
|
|
legend(l, 'location', 'west');
|
|
|
hold off;
|
|
hold off;
|
|
|
if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
|
|
if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
|