{{indexmenu_n>999}} ====== Newindex ====== ### We can change the value of single elements or rows of a matrix by assigning new values to the indexed elements ### ===== Example ===== ==== Input ==== A = Matrix.New({{1,2},{3,4},{5,6}}) print(A) A[2][2] = 0 print(A) A[3] ={7,8} print(A) ==== Result ==== { { 1 , 2 } , { 3 , 4 } , { 5 , 6 } } { { 1 , 2 } , { 3 , 0 } , { 5 , 6 } } { { 1 , 2 } , { 3 , 0 } , { 7 , 8 } } ===== Table of contents ===== {{indexmenu>..:#2|tsort}}
A = Matrix.New({{1,2},{3,4},{5,6}}) print(A) A[2][2] = 0 print(A) A[3] ={7,8} print(A)