dB scale (log scale) of a polar plot graph

100 ビュー (過去 30 日間)
atarli
atarli 2013 年 10 月 17 日
移動済み: Voss 2024 年 6 月 30 日
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)
  1 件のコメント
murat alboga
murat alboga 2014 年 5 月 14 日
移動済み: Voss 2024 年 6 月 30 日
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:

サインインしてコメントする。

回答 (5 件)

Jonathan LeSage
Jonathan LeSage 2013 年 10 月 17 日
編集済み: Jonathan LeSage 2013 年 10 月 17 日
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 件のコメント
atarli
atarli 2013 年 10 月 18 日
thanks for all of your helps, i thought to plot it with polar(theta,log10(result)) command. what do you think about it?
Ibrahim Samy
Ibrahim Samy 2017 年 10 月 24 日
i think you better use polardb(theta , result, -20, '-k')
-20 for minimal db u can see

サインインしてコメントする。


sixwwwwww
sixwwwwww 2013 年 10 月 17 日
編集済み: sixwwwwww 2013 年 10 月 17 日
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 件のコメント
atarli
atarli 2013 年 10 月 18 日
thanks for all of your helps, i thought to plot it with polar(theta,log10(result)) command. what do you think about it?
sixwwwwww
sixwwwwww 2013 年 10 月 18 日
You can plot it but in case of negative values of result you should make two plots separately as I did. One plot will be for absolute value and other will be for phase value

サインインしてコメントする。


Vivek Selvam
Vivek Selvam 2013 年 10 月 17 日
You can try this: Polar Plot Tool - dB
But careful about the gain conversion as given the tool description (polar_dB makes a plot of gain=10*log10(g) versus polar angles phi)
  2 件のコメント
atarli
atarli 2013 年 10 月 18 日
thanks for all of your helps, i thought to plot it with polar(theta,log10(result)) command. what do you think about it?
Vivek Selvam
Vivek Selvam 2013 年 10 月 18 日
log10() is imaginary for negative values and negative for values between 0 and 1. You might want to solve that.

サインインしてコメントする。


atarli
atarli 2013 年 10 月 18 日
thanks for all of your helps, i thought to plot it with polar(theta,log10(result)) command. what do you think about it?

Yasir Ahmed
Yasir Ahmed 2018 年 1 月 24 日
Yes that happens because the array response in certain directions is very close to zero and on a logarithmic scale that's a big negative value. Polar plot can only handle values zero and above. So one way around this problem is to divide the vector by the minimum value of the vector so that on a log scale the minimum value is zero (20*log10(1)=0). This will work quite well if the range of values in the vector is not that big. For more visit:

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by