  Modular data is an important topic of study in rational conformal field
theory. A modular datum defines finite dimensional representations of the
modular group $\mbox{SL}_2(\mathbf{Z})$. For every Fourier matrix in a modular
datum there exists an Allen matrix obtained from the Fourier matrix after
dividing each its row with the first entry of that row. In this paper, we
classify the non-homogenous Fourier matrices and non-homogenous Allen matrices
up to rank $5$. The methods developed here are useful for the classification of
the matrices of higher ranks. Also, we establish some results that are helpful
in recognizing the $C$-algebras not arising from Allen matrices by just looking
at the character table of the $C$-algebra, in particular, the first row of the
character table.
