Regarding BIQUAD IIR implementation in MATLAB
EDIT: the answer below assumes that you called tf2sos with [sos,gain] as output arguments, and that your question is about the necessity of making use of the output variable gain. Thanks to Hilmar for pointing out this potential misunderstanding. His answer is about the equivalence of two different calls to tf2sos, one with two output arguments, and the other with just one. Note that when called with just one output argument, the resulting sos is different from the one obtained from a call with two output arguments.


If you want the correct scaling, in the sense that high frequency signals are passed through the filter with a gain of $1$, then you need to use the variable gain. If you don't use it you'll get the same high pass filter, but with some scaling. For fixed-point implementations, appropriate scaling is very important to minimize overflow and other quantization artefacts. For a Matlab implementation I wouldn't worry too much about scaling and just implement the filter with the correct gain.