Say I want a way to generate matrices with the following properties,
- All non-diagonal elements are either $0,1,-1$
The diagonals are either $k$ or $k+1$ for some $k \in \mathbb{Z}^+$ for some $k$ specified before hand.
for any diagonal element it should hold that $A_{ii} = \sum_{j \neq i} \vert A_{ij} \vert$
Is there a way to create a generator of such matrices? (as a function of the pre-specified $k$)
SparseArray
$\endgroup$