|
@@ -67,18 +67,20 @@ function [BFF] = sphear_fir_render_directions(FIR, fmin, fmax, N, Npre, Nfft, pl
|
|
|
cext = "_color";
|
|
cext = "_color";
|
|
|
else
|
|
else
|
|
|
%% mono plot
|
|
%% mono plot
|
|
|
- wopts = '-;W;';
|
|
|
|
|
- popts = '--;X;';
|
|
|
|
|
- dopts = '-.;Y;';
|
|
|
|
|
|
|
+ wopts = '-';
|
|
|
|
|
+ popts = '--';
|
|
|
|
|
+ dopts = ':';
|
|
|
copt = '-mono';
|
|
copt = '-mono';
|
|
|
cext = "_mono";
|
|
cext = "_mono";
|
|
|
end
|
|
end
|
|
|
f = figure;
|
|
f = figure;
|
|
|
hold on;
|
|
hold on;
|
|
|
grid on;
|
|
grid on;
|
|
|
- axis([fmin, fmax, -30, 0]);
|
|
|
|
|
|
|
+ axis([fmin, fmax, -40, 0]);
|
|
|
tics('y', [6, 0, -3, -6, -9, -12, -15, -20, -25, -30]);
|
|
tics('y', [6, 0, -3, -6, -9, -12, -15, -20, -25, -30]);
|
|
|
tics('x', [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 15000, 20000]);
|
|
tics('x', [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 15000, 20000]);
|
|
|
|
|
+ ca=get (gcf, "currentaxes");
|
|
|
|
|
+ set(ca,"fontweight","bold","linewidth",1.5)
|
|
|
|
|
|
|
|
idx = 1;
|
|
idx = 1;
|
|
|
for m = [1, 5, 9, 13, 3, 7, 11, 15]
|
|
for m = [1, 5, 9, 13, 3, 7, 11, 15]
|
|
@@ -95,24 +97,28 @@ function [BFF] = sphear_fir_render_directions(FIR, fmin, fmax, N, Npre, Nfft, pl
|
|
|
end
|
|
end
|
|
|
fr = (1:Nfft/2) * Fs/Nfft;
|
|
fr = (1:Nfft/2) * Fs/Nfft;
|
|
|
%% W
|
|
%% W
|
|
|
- semilogx(fr, bfft(idx,1,1:end/2) * 10^(6/20), wopts);
|
|
|
|
|
|
|
+ p1 = semilogx(fr, bfft(idx,1,1:end/2) * 10^(-6/20), wopts, "linewidth", 1.5);
|
|
|
%% print principal and diagonal directions with different colors
|
|
%% print principal and diagonal directions with different colors
|
|
|
- if (idx > 4)
|
|
|
|
|
- col = popts;
|
|
|
|
|
- else
|
|
|
|
|
- col = dopts;
|
|
|
|
|
- end
|
|
|
|
|
if (rem(idx, 2) == 1)
|
|
if (rem(idx, 2) == 1)
|
|
|
- semilogx(fr, bfft(idx,2,1:end/2), col);
|
|
|
|
|
|
|
+ if (idx > 4)
|
|
|
|
|
+ p2 = semilogx(fr, bfft(idx,2,1:end/2) * 10^(6/20), dopts, "linewidth", 1.5);
|
|
|
|
|
+ else
|
|
|
|
|
+ p3 = semilogx(fr, bfft(idx,2,1:end/2) * 10^(6/20), popts, "linewidth", 1.5);
|
|
|
|
|
+ end
|
|
|
else
|
|
else
|
|
|
- semilogx(fr, bfft(idx,3,1:end/2), col);
|
|
|
|
|
|
|
+ if (idx > 4)
|
|
|
|
|
+ p2 = semilogx(fr, bfft(idx,3,1:end/2) * 10^(6/20), dopts, "linewidth", 1.5);
|
|
|
|
|
+ else
|
|
|
|
|
+ p3 = semilogx(fr, bfft(idx,3,1:end/2) * 10^(6/20), popts, "linewidth", 1.5);
|
|
|
|
|
+ end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
idx = idx + 1;
|
|
idx = idx + 1;
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
- l = legend('W (+6dB)', 'XY principal', 'XY diagonal');
|
|
|
|
|
- legend(l, 'location', 'west');
|
|
|
|
|
|
|
+ l = legend([p1, p2, p3],
|
|
|
|
|
+ {"XY principal directions", "W (+12dB for clarity)", "XY diagonal directions"});
|
|
|
|
|
+ legend(l, 'location', 'southwest');
|
|
|
if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
|
|
if (strcmp(plot_on, 'eps') || strcmp(plot_on, 'epsc') || plot_on == 1)
|
|
|
print(f, '-deps', '-tight', copt,["figures/sphear_directions.eps"]);
|
|
print(f, '-deps', '-tight', copt,["figures/sphear_directions.eps"]);
|
|
|
else
|
|
else
|