Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dbtopower

Function for inter-converting between decibels and a linear scale


Description

The function converts from decibels to a linear scale

Usage

dbtopower(specdata, const = 10, base = 10, inv = FALSE)

Arguments

specdata

A numeric object or an object of class trackdata

const

A single element numeric vector. Defaults to 10

base

A single element numeric vector. Defaults to 10

inv

Logical. If T, then the conversion is from a logarithmic to an anti-logarithmic form, otherwise the other way round

Details

The function returns base^(specdata/const) if inv=F, otherwise, const * log(dat, base=base). If the object to which this function is applied is of class 'trackdata' then this function is applied to \$data.

Value

An object of the same class.

Author(s)

Jonathan Harrington

See Also

Examples

# convert 10 dB to a power ratio
vec = dbtopower(10)
# convert dB-data to a power ratio and back to decibels
res = dbtopower(vowlax.dft.5)
res = dbtopower(res, inv=TRUE)

emuR

Main Package of the EMU Speech Database Management System

v2.2.0
GPL (>= 2)
Authors
Raphael Winkelmann [aut, cre], Klaus Jaensch [aut, ctb], Steve Cassidy [aut, ctb], Jonathan Harrington [aut, ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.