How do I override a calculated value within a matrix with an assigned value? Here is an example of what I mean. Consider matrix Y,
Y = MatrixForm[Table[i^j,{i, 0, 1, 0.5}, {j, 0, 2, 1}]]
with the output
Of course, the Indeterminate
in Y[1, 1]
is due to 0^0
. How do I override the Indeterminate
output with say Y[1, 1] = 1
while creating the matrix?
Thank you.
MatrixForm
is a wrapper, you probably wantMatrixForm[ Y = Table[ .... ] ]
2) Parts are taken and assigned withPart
which has an alias in[[ ]]
so what in a more classic C-derived language would beY[1, 1]
in Mathematica isY[[1, 1]]
. So all together you wantY = Table[ ... ]; Y[[1,1]]=1; MatrixForm[Y]
. $\endgroup$