list={1,2,3,4,5,6}; list[[2;; ;;2]]. Extract[list, Range[2,Length@list,2]. Partition[list, 2][[All, 2]]. Etc.
– marchOct 29 '15 at 06:46
If you search the docs for "take every second element", the first hit is Take, which is the function. If you use the free-form input to "take every second element from list", you get %[[1 ;; -1 ;; 2]], which is easily adapted.
– Patrick StevensOct 29 '15 at 07:06
The function that march and Patrick are referring to is Span, just type ?Span into your notebook to get the information on how to use it.
– Jason B.Oct 29 '15 at 07:35
2
Guy, we should re-open this question, and make it a canonical version. Then mark this one as a duplicate. This might not be that easy to find for a beginner actually ...
– SzabolcsOct 29 '15 at 08:40
list={1,2,3,4,5,6}; list[[2;; ;;2]].Extract[list, Range[2,Length@list,2].Partition[list, 2][[All, 2]]. Etc. – march Oct 29 '15 at 06:46Take, which is the function. If you use the free-form input to "take every second element fromlist", you get%[[1 ;; -1 ;; 2]], which is easily adapted. – Patrick Stevens Oct 29 '15 at 07:06Span, just type?Spaninto your notebook to get the information on how to use it. – Jason B. Oct 29 '15 at 07:35