National Instruments Car Stereo System 320571-01 用户手册

下载
页码 157
Chapter 2
NI-DSP Analysis VI Reference
NI-DSP SRM for LabVIEW for Windows
2-17
Part 3:  NI-DSP Function Reference
DSP Decimate
Decimates the input sequence X by the
decimating factor and the averaging control.
If Y represents the output sequence Decimated
Array
, the elements of the sequence Y are
obtained using:
  
Y
i
=
X
im
                  
1
m
X
i( m
+
k )
    
k
=
0
m
1


if ave = no averaging
if ave = averaging
for i = 0, 1, 2, …, size -1
size = trunc
( )
n
m
 ,
where n is the number of elements in  X,
m is the decimating factor,
ave is the averaging option, and
size is the number of elements in the output sequence Y.
X is a DSP Handle Cluster that indicates the memory buffer on the DSP board that contains the input
signal array.
Y in is a DSP Handle Cluster that indicates the memory buffer on the DSP board that will contain the
decimated output array.
Y out is a DSP Handle Cluster that is identical to Y in, but with the results of the decimated array
already stored in the memory buffer on the DSP board.
decimating factor must be greater than zero:
0 < decimating factor 
 n.
If decimating factor is greater than the number of samples in X or less than or equal to zero, the VI
returns an error.  decimating factor defaults to 1.
averaging has two options:
0:  averaging.
1:  no averaging.
averaging defaults to no averaging.
error in (no error) contains the error information from a previous VI.  If an error occurs, it is passed out
error out and no other calls are made.
error out contains the error information for this call.
The operation can be performed in place; that is, the input X and the output Y can be the same DSP Handle Cluster.