RESAMP Function
Standard Library function that resamples an array to new dimensions.
enabled.
Usage
result = RESAMP(array, dim1, ..., dimn)
Input Parameters
arrayAn array of n dimensions.
dimiIntegers (>0) specifying the new dimensions.
Returned Value
result—The resampled version of array.
Keywords
Interp—If set, n-linear interpolation is used instead of the default nearest‑neighbor interpolation.
Examples
PM, RESAMP([0, 1, 2, 3], 3)
; PV-WAVE prints:
;    0
;    2
;    3
PM, RESAMP([0, 1, 2, 3], 3, /Interp)
; PV-WAVE prints:
;    0.000000
;    1.50000
;    3.00000
PM, RESAMP([0, 1, 2, 3], 6, /Interp)
; PV-WAVE prints:
;    0.000000
;    0.600000
;    1.20000
;    1.80000
;    2.40000
;    3.00000
PM, RESAMP([[0, 1, 2, 3], [4, 5, 6, 7]], 6, 3, /Interp)
; PV-WAVE prints:
;    0.000000       2.00000       4.00000
;    0.600000       2.60000       4.60000
;    1.20000       3.20000       5.20000
;    1.80000       3.80000       5.80000
;    2.40000       4.40000       6.40000
;    3.00000       5.00000       7.00000
See Also