nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
dbconv.hpp File Reference
#include <memory_resource>
#include <nk/value/value.hpp>
#include <string>

Go to the source code of this file.

Functions

Value nk::signal::db (const Value &x, const std::string &signalType="voltage", std::pmr::memory_resource *mr=nullptr)
 Convert magnitude or power to decibels.
Value nk::signal::db2mag (const Value &d, std::pmr::memory_resource *mr=nullptr)
 Inverse of db in voltage form: \( y = 10^{d/20} \).
Value nk::signal::mag2db (const Value &x, std::pmr::memory_resource *mr=nullptr)
 Magnitude to decibels (voltage form): \( y = 20 \log_{10} x \).
Value nk::signal::db2pow (const Value &d, std::pmr::memory_resource *mr=nullptr)
 Inverse of pow2db: \( y = 10^{d/10} \).
Value nk::signal::pow2db (const Value &p, std::pmr::memory_resource *mr=nullptr)
 Power to decibels: \( y = 10 \log_{10} p \).