  For a linear matrix function $f$ in $X \in \R^{m\times n}$ we consider
inhomogeneous linear matrix equations $f(X) = E$ for $E \neq 0$ that have or do
not have solutions. For such systems we compute optimal norm constrained
solutions iteratively using the Conjugate Gradient and Lanczos' methods in
combination with the More-Sorensen optimizer. We build codes for ten linear
matrix equations, of Sylvester, Lyapunov, Stein and structured types and their
T-versions, that differ only in two five times repeated equation specific code
lines. Numerical experiments with linear matrix equations are performed that
illustrate universality and efficiency of our method for dense and small data
matrices, as well as for sparse and certain structured input matrices.
Specifically we show how to adapt our universal method for sparse inputs and
for structured data such as encountered when fusing image data sets via a
Sylvester equation algorithm to obtain an image of higher resolution.
