How to create the set of variables as a matrix in stead of vector?

I have used the ModelingToolkit, DifferentialEquations, and OrdinaryDiffEq packages to solve the ODE system.
In the past, I have implemented the set of variables x as a vector like:

@variables (x(t))[1:m]

Is there any way to implement the set of variables as a matrix instead of a vector? For I need the variables x as a m by m (m^2 variables in total).

Thank you for your time and consideration.

This seemed to work for me? (I set m=5, hence the 1:5)

julia> @variables z[1:m,1:m]
1-element Vector{Symbolics.Arr{Num, 2}}:
1 Like

Thank you for your comment. I got the matrix of variables now.

1 Like