  For any finite field ${\mathbb F}_q$ with $q$ elements, we study the set
${\mathcal F}_{(q,m)}$ of functions from ${\mathbb F}_q^m$ into ${\mathbb
F}^q$. We introduce a transformation that allows us to determine a linear
system of $q^{m+1}$ equations and $q^{m+1}$ unknowns, which has for solution
the Hamming distances of a function in ${\mathcal F}_{(q,m)}$ to all the affine
functions.
