I have a list :
{{j1,j2,j3},{j4,j5,j6}}
I would like to take the 5'th element of this list that is composed of two sublist.
How to do that ?
Indeed j[[5]]
returns an error as it thinks I want the 5'th sublist which doesn't exist.
I tried to find a similar topic but I didn't find it on this website.
I am a huge beginner in mathematica
Flatten[list][[5]]
? $\endgroup$ – J. M. will be back soon♦ May 18 '17 at 12:43Flatten[j][[5]]
? We basically have three symbols here,Flatten
,j
orlist
, and5
, which is just only symbol more complicated thanj[[5]]
, which doesn't work. You could usej[[2, 2]
to getj5
, but that does not really fit how you have framed the problem. $\endgroup$ – Michael E2 May 18 '17 at 13:33Flatten[x][[i]]
are quite common. It would be a mistake to assume thatFlatten[x][[i]]
is fundamentally slower than Matlab'sx(i)
--- it could be, but that depends on both implementations. $\endgroup$ – nben May 18 '17 at 15:15