Multiply Const: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
m (revised wording in Preview)
No edit summary
Line 6: Line 6:
See [[Fast_Multiply_Const]] for a more performant version of this block for '''scalar''' values only.  
See [[Fast_Multiply_Const]] for a more performant version of this block for '''scalar''' values only.  


<code>Added in 3.8</code> If the constant is a '''scalar''', the "Fast" version is automatically invoked (done behind the scenes).
<code>Added in 3.8</code> If the input is a '''vector''', the "Fast" version is automatically invoked (done behind the scenes).


== Parameters ==
== Parameters ==

Revision as of 10:53, 31 October 2019

Multiplies the input stream by a scalar or vector constant (element-wise if vector).

output = input * constant

See Fast_Multiply_Const for a more performant version of this block for scalar values only.

Added in 3.8 If the input is a vector, the "Fast" version is automatically invoked (done behind the scenes).

Parameters

(R): Run-time adjustable

Constant (R)
Scalar or vector constant

Example Flowgraph

This flowgraph uses three Multiply type blocks. The top Multiply Const Block and middle Multiply Block are driven by the GUI Chooser to act as a Transmit / Receive switch. The bottom Multiply Const Block is a Volume control, the 'constant' being the 'volume' parameter from the QT GUI Range block.

Note: The lower section is a working 2 meter NBFM receiver.

Selector demo.png

Source Files

C++ files
If single sample input
If vector input
Header files
If single sample input
If vector input
Public header files
If single sample input
If vector input
Block definition
[1]