After designing an IIR filter on sptool, I export the coefficients (SOS) and gain (G) into a .mat file. When filtering, we can use sosfilt(SOS, x), which results in the correct output but with the wrong scaling. I guess this is what the gain variable G is for, but the documentation of sosfilt() never mentions this.
The impulse response of the filter has values of several powers of ten (~10^16), whereas in sptool it had very small coefficients (< 1).
How is one supposed to use the SOS and G variables when exported from sptool, to correctly scale the weights of the exported IIR filter?