Why does the DB function not return the proper power ratio in Signal Processing Toolbox?

J
jasminemichae · Mar 16, 2021 · 1.9K views
Question
I expect DB to always be power ratio and not amplitude ratio. Hence, dB should equal 10*log10 (value) and not 20*log10(value) for amplitude to power conversion.  
Expert Answer
Profile picture of John Williams
John Williams PhD Expert
Answered Aug 12, 2026
This bug has been fixed in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
 
Generally for engineers of communications and electronics background, "dB" unit represents a ratio, for example, between input and output. On the other hand "dBm" unit represents a magnitude of power. However, in this case "dB" is used as a magnitude of power.
 
You can use the following syntax of the DB function as a workaround. If X is the value in question, use:
 
 
db(X,'power')
To get the 10*log10(X) instead of the 20*log10(X).

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!