I am using Mathematica 10 now.
I typed code below
{{1, 2}, {2, 4}, {3, 6}, {4, 8}}[[;; , 1]][[1]]
and this gives result
1
But code
{{1, 2}, {2, 4}, {3, 6}, {4, 8}}[[;; , 1, 1]]
gives error
Part::partd: Part specification {{1,2},{2,4},{3,6},{4,8}}[[1;;All,1,1]] is longer than depth of object. >>
But according to help doc
expr[[i,j,...]]] or Part[expr,i,j,...]] is equivalent to expr[[i]][[j]]...
What is wrong?!! I remember I always coded it like this in Mathematica 9, no error occurs. Is it a bug??
Comments
Post a Comment