(I) Downsample
Reduce the sampling rate by an integer multiple
Reduce the sampling rate by an integer multiple
- syntax
y =downsample (x, n)
y =downsample (x, n, phase) y =downsample (x, n) reduces the sampling rate of x by retaining the first sample and then the NTH sample after the first sample. If x is a matrix, the function treats each column as a separate sequence. Y = Downsample (x, n, phase) specifies the number of samples for the sampling sequence under offset. Example 1:
reduces the sampling rate of the sequence by a factor of 3. x = [1 2 3 4 5 6 7 8 9 10];
y =downsample (x, 3)
y = 1×4 1 4 7 10 example 2: reduce the sampling rate of the sequence by 3 times and increase the phase offset by 2. That is to offset two Numbers backward from the first number for downsampling y =downsample (x, 3, 2)
y = 1×3 3 6 9
x1 = [1 2 3 4 5 6 7 8 9];
y =downsample(x1,3,1) y = 2 5 8
example 3:
reduces the sampling rate of the matrix by 3 times. X = [1 2 3;
4 5 6;
7 8 9;
10, 11 12];
y =downsample (x, 3)
y = 2×3 12 3
10 11 12 input parameters
x — input array
vector | matrix
input array, specified as a vector or matrix. If x is a matrix, the function treats the columns as independent channels. Example: Cosine (PI/4 * (0:15 9)) + RANDn (1,160) specifies the sine curve plus the White Gaussian noise. Example: cos (PI./ [4; 2] * (0:15 9)) ‘+ randn (160,2) specifies a two-channel sine wave. Data type: single | double
complex number support: is
n – down sampling coefficient
positive integer
under sampling factor, specified as a positive integer. Data type: single | double
phase – offset
(default) | positive integer
offset, specified as a positive integer between 0 and n-1. Data type: single | double output parameter
y – down sampling array
vector | matrix
down sampling array, returned as a vector or matrix.
Read More:
- Usage of pause function in MATLAB
- The usage of several integer functions in MATLAB (fix, floor, ceil, round)
- Matlab — looking for peak function
- Matlab matrix transpose function
- The function and usage of argc and argv in C language
- tf.contrib.layers .xavier_ Initializer function usage
- The difference of four kinds of integer function (fix floor ceil round) in MATLAB
- How to express ln function in MATLAB?
- Matlab error “Object returned error code of the xlswrite function: 0x800A03EC
- Type definition error – one of the causes of type definition errors is WM in Oracle_ Concat function usage
- matlab Error Subscript indices must either be real positive integers or logicals.
- Matlab: Three forms of random number generated (Rand, Randi and Randn)
- The usage details of SVM
- Deep learning: derivation of sigmoid function and loss function
- Matlab prompt error
- How to wrap a long string in MATLAB
- Usage of Python dropout
- Usage of NVL in SQL
- np.unique Usage of ()
- Matlab draw logarithmic coordinates!