# dB scale (log scale) of a polar plot graph

252 views (last 30 days)

Show older comments

this is my function. how can i show it in dB scale? thanks everyone wants to help.

theta = 0:0.01:2*pi;

x = 60; % k*a

result =(((cos(theta)).*(sin((x/2).*sin(theta))/(x/2).*sin(theta))));

polar(theta,result)

##### 0 Comments

### Answers (6)

Jonathan LeSage
on 17 Oct 2013

Edited: Jonathan LeSage
on 17 Oct 2013

You can simply convert the results directly to the decibels scale and plot the transformed results using the polar function. I suggest you refer to the definition of the decibel first. Additionally, you can check out the mag2db function. Here are some useful links to get you started:

Once you have the results in terms of decibels, you can plot using the polar function as you did before!

##### 2 Comments

Ibrahim Samy
on 24 Oct 2017

i think you better use polardb(theta , result, -20, '-k')

-20 for minimal db u can see

sixwwwwww
on 17 Oct 2013

Edited: sixwwwwww
on 17 Oct 2013

Dear Atarli,

Here is the conversion to decibel:

result =(((cos(theta)).*(sin((x/2).*sin(theta))/(x/2).*sin(theta))));

result_dB = 10 * log(result);

polar(theta,abs(result_dB))

polar(theta, angle(result_dB))

I hope it helps. Good luck!

##### 4 Comments

sixwwwwww
on 18 Oct 2013

Vivek Selvam
on 17 Oct 2013

##### 2 Comments

Vivek Selvam
on 18 Oct 2013

murat alboga
on 14 May 2014

Edited: murat alboga
on 14 May 2014

Selamun aleykum everyone, hello... I have one questin abouth broadside array and polar pattern as dB. I have project in matlab.That is broadside array pattern.Below code, i achieved array factor as a magnitude, but when i converted array factor to dB graph is changed and corrupted. I'm tried figure out that problem but i didn't.Please can you help me... code:

N=5;

d=1;

k=2*pi;

theta=0:0.01:M+1;

psi=k.*d.*cos(theta);

AF=sinc((N.*psi./2)/pi)./sinc((psi./2)/pi);

figure;

polar(theta,AF);

mnAF=max(AF);

figure;

polar(theta,20*log10(AF));

array factor as magnitude

dB scale:

##### 0 Comments

Yasir Ahmed
on 24 Jan 2018

##### 0 Comments

### See Also

### Categories

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!