Two simple questions. Suppose I have a matrix created as
matrix C =
[[1, 2, 3],
[2, 4, 0],
[8, 1, 9]];
How can I access individual elements of this matrix? I have tried the obvious C[1][2] = 5 but this syntax is not allowed.
Also, how would I create a matrix without needing to specify its initial elements, as was done for C above? Something like “real[int][int] D(20, 20)”, although again this is not correct.