Skip to main content
3 of 3
deleted 46 characters in body

Take sublist with fixed interval

For example:

a = Range[20];
a = ArrayReshape[a, {4, 5}]

matrix a

I want to take elements from a with interval = 2 :

sublist of a

Take[a, {1, -1, 2}] fails to do this.

It would be better if it works for 3D or higher-dimensional large matrix.

novice
  • 2.3k
  • 1
  • 25
  • 30