Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Negative Indexes' topicStudent Support Forum > General > Archives > "Negative Indexes"

Next Comment >Help | Reply To Topic
Author Comment/Response
08/25/10 9:26pm

The mathematica documentation says negative indexes count from the bottom of a tree up, so Level[{a, {b, {{c, d}, e}, f}},{-1}] is a,b,c,d,e,f,q. This makes sense. But when i ask for {-2}, it only gives second level results that contain unique elements. It gives {a,q},{c,d}. It excludes all the other sublists because they include c,d. Yet the sublist {{c,d},e} is on the second level from e. Is this how the algorithm for negative indexes always work?

URL: ,

Subject (listing for 'Negative Indexes')
Author Date Posted
Negative Indexes Zach 08/25/10 9:26pm
Re: Negative Indexes yehuda ben-s... 08/29/10 09:19am
Next Comment >Help | Reply To Topic