Answer by Mr.Wizard for Weird behavior when changing parts of matrix
This is simply the logical outcome of Mathematica treating an array as an ordinary expression tree.Your array isn't really an array at all, but merely a collection of List expressions inside another...
View ArticleAnswer by RunnyKine for Weird behavior when changing parts of matrix
Actually, I think the reason it works like this is because Mathematica lists can be anything, so it assumed you want the second element of this list of lists to be 0. So if you want all elements of...
View ArticleWeird behavior when changing parts of matrix
I have this matrix:mat = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17, 18, 19, 20}, {21, 22, 23, 24, 25}};and here are its second row and second column:{mat[[2]], mat[[All, 2]]}(*...
View Article