I don't believe that is possible.
If you literally wanted sequential numeric values in your array then the following would do it.
Note that there are only 16 elements in your array declaration, not 25.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim Matrix(4,4) As Int
Dim x, y, counter As Int
counter = 0
For x = 0 To 3
For y = 0 To 3
counter = counter + 1
Matrix(x,y) = counter
Next ' y
Next ' x
End Sub
Thanks for your answer PenguinHero
Yes the elements of my array is 16 indeed.
The number values are not sequential.
So the only way is to set the value one by one like this? And if i have an array(50,50) i need 250 lines of code?
B4X:
Dim Matrix(4,4) as Int
Matrix(0,0)=10
Matrix(0,1)=8
Matrix(0,2)=25
Matrix(0,3)=2
Matrix(1,0)=5
etc