I think of $\mathbb R^{n\times m}$ as a matrix of size $n \times m$. But what is $f:\mathbb R^{n \times m} \to \mathbb R^n$ and $g:\mathbb R^{n \times m} \to \mathbb R^q$ in following?
Consider \begin{align} \dot x (t) &= f(x(t),u(t)) \tag 1 \\ 0 &\geq g(x(t),u(x)) \tag 2 \end{align} where $x(t) \in \mathbb R^n$ and $u(t) \in \mathbb R^m$. Both $f:\mathbb R^{n \times m} \to \mathbb R^n$ and $g:\mathbb R^{n \times m} \to \mathbb R^q$ are continuously differentiable.