Log10: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "output = n*log10(input) + k Args: * n - Scalar multiplicative constant * vlen - Input vector length * k - Scalar additive constant")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Block Docs]]
output = n*log10(input) + k
output = n*log10(input) + k


Args:
Only handles Float input and output.
* n - Scalar multiplicative constant
 
* vlen - Input vector length
This block handles null and negative samples by using, for each sample, the max between the sample and the minimum positive value for a float32 number.
* k - Scalar additive constant
 
== Parameters ==
 
; n
: Scalar multiplicative constant
; vlen
: Input vector length
; k
: Scalar additive constant
 
== Example Flowgraph ==
 
This flowgraph shows how the Log10 basic usage. The negative value handling can be seen.
 
[[File:Log10-sine-ex-graph.png|700px]]
 
[[File:Log10-sine-ex-output.png|700px]]
 
== Source Files ==
 
; C++ files
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/nlog10_ff_impl.cc Float input]
 
; Header files
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/nlog10_ff_impl.h Float input]
 
; Public header files
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/nlog10_ff.h Float input]
 
; Block definition
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_nlog10_ff.block.yml GRC yaml]

Latest revision as of 09:09, 11 July 2019

output = n*log10(input) + k

Only handles Float input and output.

This block handles null and negative samples by using, for each sample, the max between the sample and the minimum positive value for a float32 number.

Parameters

n
Scalar multiplicative constant
vlen
Input vector length
k
Scalar additive constant

Example Flowgraph

This flowgraph shows how the Log10 basic usage. The negative value handling can be seen.

Log10-sine-ex-graph.png

Log10-sine-ex-output.png

Source Files

C++ files
Float input
Header files
Float input
Public header files
Float input
Block definition
GRC yaml