upsample#
Upsample a signal by stuffing zeros
-
template<typename T>
__MATX_INLINE__ auto matx::upsample(const T &op, int32_t dim, index_t n)# Operator to upsample an operator by inserting zeros between values.
- Template Parameters:
T – Input operator/tensor type
- Parameters:
op – Input operator
dim – the factor to upsample
n – Upsample rate
- Returns:
Upsampled operator
Examples#
// Upsample a signal of length 100 by 5
int n = 5;
auto t1 = make_tensor<TestType>({100});
(t1 = static_cast<TestType>(1)).run(exec);
auto us_op = upsample(t1, 0, n);