I'm just trying to set up a Matrix 24 by 24 with indices that start from 0 to 23
Array[t, {24, 24}, {0, 0}];
Do[t[k, j] = k + j, {k, 0, 23}, {j, 0, 23}];
t[1, 1] // MatrixForm
MatrixForm[t]
Everything seems fine but when I'd like to have the output in matrixForm the result is simply t ( https://gyazo.com/312ac29c839ca63b831a3e22423f5571 )
Does anybody knows why?
Clear[t]
t = Array[#1 + #2 &, {24, 24}, {0, 0}];
Dimensions@t
and finallyt // MatrixForm
$\endgroup$Array
thet
is the entries. You might want to doClearAll[t]; T0 = Array[t, {24, 24}, {0, 0}]; Do[t[k, j] = k + j, {k, 0, 23}, {j, 0, 23}]; MatrixForm[T0];
$\endgroup$Table
. It is the most natural way, in Mathematica, to create the matrix you want. $\endgroup$