Downsample

Downsample[array,n]
returns a downsampled version of the array by sampling every n^(th) element.

Downsample[array,n,offset]
starts sampling from the element at position offset.

DetailsDetails

  • In Downsample[array,n,offset], the offset has to be an integer between and n.
  • In Downsample[array,], array can be an array of any rank.
  • Downsample[array,{n1,n2,}] samples every ^(th) element in the i^(th) dimension.
  • Downsample[array,n] is equivalent to Downsample[array,n,1].

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Downsample a list by a factor of 3:

In[1]:=
Click for copyable input
Out[1]=

Use an offset:

In[2]:=
Click for copyable input
Out[2]=

Downsample a 2D array:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=

Use a different downsampling factor in each dimension:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=

Downsample a symbolic array:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)