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.

Downsample[image,]
downsamples an image.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Downsample a list by a factor of 2:

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

Downsample a 2D array:

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

Downsample an image by a factor of 2:

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

Downsample a 3D image:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2012
(9.0)
| Updated in 2016
(10.4)
Translate this page: