Abs: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Takes absolute value of data stream (i.e. strips sign). Only supports float, int, and short (not complex).") |
No edit summary |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Block Docs]] | |||
[[File:abs-block.png|100px]] | |||
The abs block converts the input data stream into its absolute value i.e. the negative input values become positive output values and the positive values remain the same at both the input and the output. | |||
== Parameters == | |||
; Vec Length | |||
: Length of the vector | |||
; IO Type | |||
: Supported data types | |||
:* Float | |||
:* Int | |||
:* Short | |||
== Example Flowgraph == | |||
This flowgraph shows a sinusoid being passed through the Abs block, producing full-wave rectification. | |||
[[File:abs-ex2.png|500px]] | |||
[[File:abs-ex.png|500px]] | |||
== Source Files == | |||
; C++ files | |||
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/abs_blk_impl.cc abs_blk_impl.cc] | |||
; Header files | |||
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/abs_blk_impl.h abs_blk_impl.h] | |||
; Public header files | |||
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/abs_blk.h abs_blk.h] | |||
; Block definition | |||
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_abs_xx.block.yml blocks_abs_xx.block.yml] |
Latest revision as of 09:21, 25 August 2022
The abs block converts the input data stream into its absolute value i.e. the negative input values become positive output values and the positive values remain the same at both the input and the output.
Parameters
- Vec Length
- Length of the vector
- IO Type
- Supported data types
- Float
- Int
- Short
Example Flowgraph
This flowgraph shows a sinusoid being passed through the Abs block, producing full-wave rectification.
Source Files
- C++ files
- abs_blk_impl.cc
- Header files
- abs_blk_impl.h
- Public header files
- abs_blk.h
- Block definition
- blocks_abs_xx.block.yml