mag2db

Convert a magnitude to decibels (dB).

📝 Syntax

  • db = mag2db(mag)

📥 Input argument

  • mag - input array: scalar, vector or matrix.

📤 Output argument

  • db - corresponding values in decibels

📄 Description

db = mag2db(mag) converts magnitude values to decibels (dB).

The conversion formula is: dB=20log10(magnitude)\text{dB} = 20 \log_{10}(\text{magnitude})

This conversion is commonly used in signal processing, acoustics, and electronics to express ratios on a logarithmic scale.

💡 Example

DB = mag2db([1, 0.01])

🔗 See also

db2mag.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?