Ver Fonte

use interp1 instead of spline so we can try different interpolation methods, cubic seems to work a little better for our purposes

Fernando Pablo Lopez-Lezcano há 10 anos atrás
pai
commit
6230776a0b
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      sphear_fir_design.m

+ 1 - 2
sphear_fir_design.m

@@ -83,7 +83,7 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, W, XYZ)
       fh = (F(dlast-1)/(Fs/2):200/(Fs/2):1)';
       %% make the end really 1.0
       fh(end) = 1;
-      rh = spline(F(dlast-1:end)/(Fs/2), A2BF(dlast-1:end,c,b)', fh);
+      rh = interp1(F(dlast-1:end)/(Fs/2), A2BF(dlast-1:end,c,b)', fh, "cubic", "extrap");
 
       %% we design the spline taking into account one additional point
       %% on the bottom edge so that it will fit better with the existing
@@ -94,7 +94,6 @@ function [FIR] = sphear_fir_design(F, A2BF, n, maxboost, Fs, Fl, W, XYZ)
 	  istart = idx;
 	end
       end
-      istart
       
       %% extract the low frequency A2B coefficients
       fl = [0 F(1:dlast-1)']' ./ (Fs/2);