Quellcode durchsuchen

use a spline for the 1/8 octave plot, plot only until 20KHz

Fernando Pablo Lopez-Lezcano vor 10 Jahren
Ursprung
Commit
cd4d83ad71
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      sphear_fir_design.m

+ 2 - 2
sphear_fir_design.m

@@ -137,7 +137,7 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, plot_on, W, X,
       fh = (F(dlast-1)/(Fs/2):200/(Fs/2):1)';
       %% make the end really 1.0
       fh(end) = 1;
-      rh = interp1(F(dlast-1:end)/(Fs/2), A2BF(dlast-1:end,c,b)', fh, "cubic", "extrap");
+      rh = interp1(F(dlast-1:end)/(Fs/2), A2BF(dlast-1:end,c,b)', fh, "spline", "extrap");
 
       %% we fit the spline taking into account one additional point
       %% on the bottom edge so that it will fit better with the existing
@@ -191,7 +191,7 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, plot_on, W, X,
 	  cext = "_mono";
 	end
 	grid on;
-	axis([300, (Fs/2)]);
+	axis([400, 20000]);
 	xticks = [300, 500, 1000, 2000, 3000, 5000, 7000, 10000, 20000];
 	set(gca, 'XTick', xticks);
 	set(gca, 'XTickLabel', sprintf('%d|', xticks));