For example:
a = Range[20];
a = ArrayReshape[a, {4, 5}]
I want to take elements from a
with interval = 2 :
Take[a, {1, -1, 2}]
fails to do this.
It would be better if it works for 3D or higher-dimensional large matrix.
For example:
a = Range[20];
a = ArrayReshape[a, {4, 5}]
I want to take elements from a
with interval = 2 :
Take[a, {1, -1, 2}]
fails to do this.
It would be better if it works for 3D or higher-dimensional large matrix.