Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Convert from db to Linear scale and vice versa.

Subject: Convert from db to Linear scale and vice versa.

From: Alex

Date: 5 Nov, 2010 15:39:04

Message: 1 of 2

Hello.
I have an array filled with dBm values

(a short example is)
-110 dBm
-120dBm
-30dBm

I want to convert data to linear scale (watt) by using the following :
y = 0.001 * 10 .^ (x/10); (*)
which is of course easy. Then I want to do some calculation in linear scale and then return data back to dB scale.


(*) The problem is that with this function I get only 0.000 so when I try to do any calculations i mostly take wrong results. How can I increase matlab precision so to be sure that the results are correct?

Regards
Alex

Subject: Convert from db to Linear scale and vice versa.

From: Walter Roberson

Date: 5 Nov, 2010 15:41:35

Message: 2 of 2

On 05/11/10 10:39 AM, Alex wrote:

> I have an array filled with dBm values
>
> (a short example is)
> -110 dBm
> -120dBm
> -30dBm
>
> I want to convert data to linear scale (watt) by using the following :
> y = 0.001 * 10 .^ (x/10); (*)
> which is of course easy. Then I want to do some calculation in linear
> scale and then return data back to dB scale.
>
>
> (*) The problem is that with this function I get only 0.000 so when I
> try to do any calculations i mostly take wrong results. How can I
> increase matlab precision so to be sure that the results are correct?

First thing to try:

format long g

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us