On the rank functions of $\mathcal{H}$-matroids