upsample
Increase the sampling rate by an integer number of times.
| Library |
|
Arguments
Input arguments
# x — input array
+
vector | the matrix
Details
An input array specified as a vector or matrix. If x — matrix, the function treats columns as independent channels.
#
n is
the sampling rate boost
factor
a positive integer
Details
The sampling rate boost factor, set as a positive integer.
| Типы данных |
|
Examples
Increasing the sampling rate
Details
Increase the sampling rate of the sequence in 3 times.
import EngeeDSP.Functions: upsample
x = [1, 2, 3, 4]
y = upsample(x, 3)
12-element Vector{Int64}:
1
0
0
2
0
0
3
0
0
4
0
0
Increase the sampling rate of the sequence in 3 once and add the phase offset to 2 times.
x = [1, 2, 3, 4]
y = upsample(x, 3, 2)
12-element Vector{Int64}:
0
0
1
0
0
2
0
0
3
0
0
4
Increase the sampling rate of the matrix in 3 times.
x = [1 2; 3 4; 5 6]
y = upsample(x, 3)
9×2 Matrix{Int64}:
1 2
0 0
0 0
3 4
0 0
0 0
5 6
0 0
0 0