ArrayResample
✖
ArrayResample
resamples only the data in the specified subrange {{xmin,xmax},…}.
Details and Options



- ArrayResample can be used for resampling data arrays based on a large selection of interpolation and approximation models.
- ArrayResample works with data arrays of any depth.
- The dimension specification dspec can be of the form:
-
n n samples Scaled[s] rescale sampling resolution by factor s All preserve dimension Automatic preserve dimension ratios {dspec1,…,dspeck} resample up to the dimension
- For a multidimensional array, the notation n is taken to be equivalent to {n,Automatic,…} and {n} equivalent to {n,All,…}.
- The dimension ratios for an array of dimensions
is taken to be
.
- The scheme determines the location of sample and resample positions and can be of the form:
-
"Point" point sampling (default) "Bin" bin sampling {"Bin",alignment} bin sampling with specified alignment - For input data of length n the "Point" resampling scheme assumes a data range from 1 to n and the "Bin" scheme assumes a data range from 0 to n with the alignment indicating the sample location within each bin.
- Bin alignment alignment can be Left, Center, Right or any number between
(Left) and 1 (Right).
- The data range can be modified using the DataRange option.
- By default, the data is resampled on the entire data domain, ranging from 1 to
for the "Point" scheme and from 0 to
for the "Bin" scheme. Use the DataRange option to modify the coordinates of the data domain.
- With a subrange {{xmin,xmax},…} specified with respect to the DataRange, only the data values in the given interval are resampled. »
- The following options can be given:
-
Antialiasing False apply antialiasing when downsampling DataRange Automatic range of the input data Padding "Fixed" padding method Resampling Automatic resampling method - For possible settings for Padding, see the reference page for ArrayPad.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (8)Survey of the scope of standard use cases
Basic Uses (4)

https://wolfram.com/xid/0mlcadhb2qbe-wbpyof

Precision of the input is preserved:

https://wolfram.com/xid/0mlcadhb2qbe-ferdip


https://wolfram.com/xid/0mlcadhb2qbe-6t2t7j

Resample a subdomain of the input signal:

https://wolfram.com/xid/0mlcadhb2qbe-wsfnvr

https://wolfram.com/xid/0mlcadhb2qbe-d6qfgl

Output Dimensions (1)
Sampling Schemes (3)
By default, the "Point" sampling scheme is used:

https://wolfram.com/xid/0mlcadhb2qbe-8ualo6

Use the "Bin" scheme, which uses center alignment by default:

https://wolfram.com/xid/0mlcadhb2qbe-x95mx2

Specify the alignment of the bins:

https://wolfram.com/xid/0mlcadhb2qbe-7xwuw3

Generate a "Point" resampling with three times the input resolution:

https://wolfram.com/xid/0mlcadhb2qbe-z6uxxm

Compute the sampling positions:

https://wolfram.com/xid/0mlcadhb2qbe-3refog


https://wolfram.com/xid/0mlcadhb2qbe-b94glz

Options (5)Common values & functionality for each option
Antialiasing (1)
When downsampling, by default no antialiasing is happening:

https://wolfram.com/xid/0mlcadhb2qbe-h1lis1

https://wolfram.com/xid/0mlcadhb2qbe-dhmuqh

With antialiasing, all samples that fall in between new samples are averaged:

https://wolfram.com/xid/0mlcadhb2qbe-pay01o

DataRange (1)
DataRange specifies the domain of resampling. Subrange specification is defined with respect to this domain:

https://wolfram.com/xid/0mlcadhb2qbe-7p8y7a

https://wolfram.com/xid/0mlcadhb2qbe-0nclp7

Resample the first half using default DataRange->{1,n}, where n is the length of data:

https://wolfram.com/xid/0mlcadhb2qbe-5bzdwb

Resample the first half of the data using a {0,1} data range:

https://wolfram.com/xid/0mlcadhb2qbe-sz03bx

Padding (2)
The default padding value is "Fixed":

https://wolfram.com/xid/0mlcadhb2qbe-fe3o0z


https://wolfram.com/xid/0mlcadhb2qbe-e9cwcv

By default, the same padding is used for all dimensions:

https://wolfram.com/xid/0mlcadhb2qbe-f5fqiw

Use different paddings for different dimensions:

https://wolfram.com/xid/0mlcadhb2qbe-2ew1qr

Resampling (1)
By default, "Linear" resampling is used:

https://wolfram.com/xid/0mlcadhb2qbe-dx5z87

Use a different resampling scheme:

https://wolfram.com/xid/0mlcadhb2qbe-ssnpo7

"Nearest" resampling averages the samples if the sampling position is halfway between samples:

https://wolfram.com/xid/0mlcadhb2qbe-8hiobg

Use "NearestLeft" or "NearestRight" for a bias to left or right for half-integer sampling positions:

https://wolfram.com/xid/0mlcadhb2qbe-c7ciec

Applications (1)Sample problems that can be solved with this function
Properties & Relations (2)Properties of the function, and connections to other functions
Compare array resampling for a few different kernels:

https://wolfram.com/xid/0mlcadhb2qbe-tr2vom

Downsample can be used to downsample by an integer factor:

https://wolfram.com/xid/0mlcadhb2qbe-rx45ss


https://wolfram.com/xid/0mlcadhb2qbe-qk50ke

Possible Issues (1)Common pitfalls and unexpected behavior
Exact computations are performed with integer data:

https://wolfram.com/xid/0mlcadhb2qbe-58zqqs

https://wolfram.com/xid/0mlcadhb2qbe-nyedwm

Apply N to integer data for faster computation:

https://wolfram.com/xid/0mlcadhb2qbe-j73d6a

Wolfram Research (2014), ArrayResample, Wolfram Language function, https://reference.wolfram.com/language/ref/ArrayResample.html (updated 2016).
Text
Wolfram Research (2014), ArrayResample, Wolfram Language function, https://reference.wolfram.com/language/ref/ArrayResample.html (updated 2016).
Wolfram Research (2014), ArrayResample, Wolfram Language function, https://reference.wolfram.com/language/ref/ArrayResample.html (updated 2016).
CMS
Wolfram Language. 2014. "ArrayResample." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ArrayResample.html.
Wolfram Language. 2014. "ArrayResample." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/ArrayResample.html.
APA
Wolfram Language. (2014). ArrayResample. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ArrayResample.html
Wolfram Language. (2014). ArrayResample. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ArrayResample.html
BibTeX
@misc{reference.wolfram_2025_arrayresample, author="Wolfram Research", title="{ArrayResample}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/ArrayResample.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_arrayresample, organization={Wolfram Research}, title={ArrayResample}, year={2016}, url={https://reference.wolfram.com/language/ref/ArrayResample.html}, note=[Accessed: 26-March-2025
]}