Difference between revisions of "Add"

From GNU Radio
Jump to: navigation, search
(add Example Flowgraph)
m (Example Flowgraph)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
[[Category:Block Docs]]
 
[[Category:Block Docs]]
Adds samples across all input streams, i.e.:
+
Add samples across all input streams.  
  
output = sum(input[0], input[1], ..., input[M-1])
+
For all n samples on all M input streams x_m:
 +
output[n] = sum( x_0[n], x_1[n], ..., x_m[n])
  
 
== Parameters ==
 
== Parameters ==
Line 10: Line 11:
 
== Example Flowgraph ==
 
== Example Flowgraph ==
  
This flowgraph uses an Add Block to generate the classic "dial tone".
+
This flowgraph uses an Add Block to generate the classic "dial tone".<br>
 +
 
 
[[File:Add block fg.png|700px]]
 
[[File:Add block fg.png|700px]]
 +
 
[[File:Add_Block_out.png|700px]]
 
[[File:Add_Block_out.png|700px]]
  
Line 17: Line 20:
  
 
; C++ files
 
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_blk_impl.cc]
  
 
; Header files
 
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_blk_impl.h]
  
 
; Public header files
 
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_blk.h]
  
 
; Block definition
 
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_add_xx.block.yml]

Latest revision as of 01:33, 19 July 2020

Add samples across all input streams.

For all n samples on all M input streams x_m:

output[n] = sum( x_0[n], x_1[n], ..., x_m[n])

Parameters[edit]

Num Inputs
Number of streams to add

Example Flowgraph[edit]

This flowgraph uses an Add Block to generate the classic "dial tone".

Add block fg.png

Add Block out.png

Source Files[edit]

C++ files
[1]
Header files
[2]
Public header files
[3]
Block definition
[4]