Imagine I want to solve the following matrix system of equations

$$

begin{pmatrix}

dot{x}_{11} & dot{x}_{12} & dot{x}_{13}\

dot{x}_{21} & dot{x}_{22} & dot{x}_{23}\

dot{x}_{31} & dot{x}_{32} & dot{x}_{33}

end{pmatrix}=

begin{pmatrix}

a_{11}x_{11} & a_{12}x_{12} & a_{13}x_{13}\

a_{21}x_{21} & a_{22}x_{22} & a_{23}x_{23}\

a_{31}x_{31} & a_{32}x_{32} & a_{33}x_{33}

end{pmatrix}

$$

where $x_{ij}equiv x_{ij}(t)$ and ${a_{ij}}$ are some real coefficients. When ${a_{ij}}=1$, we can solve this with `NDSolveValue`

as follows

```
ini = RandomReal(1, {3, 3});
sol = NDSolveValue({
x'(t) == x(t),
x(0) == ini
}, x, {t, 0, 1})
```

for some random initial conditions `ini`

(also a matrix). Now, how can I include custom coefficients? Specifically, what if the coefficient matrix is such that the diagonal is zero and all the other entries are 1? That is,

$$

begin{pmatrix}

dot{x}_{11} & dot{x}_{12} & dot{x}_{13}\

dot{x}_{21} & dot{x}_{22} & dot{x}_{23}\

dot{x}_{31} & dot{x}_{32} & dot{x}_{33}

end{pmatrix}=

begin{pmatrix}

0 & x_{12} & x_{13}\

x_{21} & 0 & x_{23}\

x_{31} & x_{32} & 0

end{pmatrix}

$$

I tried setting

```
coeff = ConstantArray(1, {3, 3}) - IdentityMatrix(3)
```

followed simply by

```
ini = RandomReal(1, {3, 3});
sol = NDSolveValue({
x'(t) == coeff * x(t),
x(0) == ini
}, x, {t, 0, 1})
```

However this doesn’t seem to work and I get the error message

which seems to be related with how `NDSolveValue`

is interpreting `coeff`

I’ve noticed that, although `x(t)`

within the `NDSolve`

environment can be tretaed as a list or a list of lists, it fails its interpretation in some cases. Any ideas?