suppose I generate the following filter:
Fs = 32000; % Sampling Frequency
N = 4; % Order
Fpass = 400; % Passband Frequency
Apass = 1; % Passband Ripple (dB)
h = fdesign.lowpass('N,Fp,Ap', N, Fpass, Apass, Fs);
Hd = design(h, 'cheby1', 'FilterStructure', 'df2sos');
"Hd" at the interactive prompt gives me:
sosMatrix: [1 2 1 1 -1.97232454484577 0.978340933957857;1 2 1 1 -1.94676435093801 0.948444394718458]
ScaleValues: [0.00150409727802169;0.000420010945111697;0.891250938133746]
I notice that freqz(Hd.sosMatrix) gives me a wildly off magnitude estimation (but with the correct frequency cutoff).
My question is, how do I use this Hd.ScaleValues factor? There are 3 values for two sections.