フィルターのクリア

Polar Plot for 2 element antennas

2 ビュー (過去 30 日間)
Aswas
Aswas 2018 年 8 月 30 日
回答済み: Henry Giddens 2018 年 8 月 31 日
I have this code, would like to get plot (b) instead of (a)
%======================
n=2;
k=2;
delta=pi/120;
phi=0:0.0001:2*pi;
s=((2*pi*cos(phi)/k)+delta);
E=(sin(n*s/2))./(n*sin(s/2));
a=[phi,E];
plot(s);
figure;polar(phi, abs(E));
  1 件のコメント
Aswas
Aswas 2018 年 8 月 30 日

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

採用された回答

Henry Giddens
Henry Giddens 2018 年 8 月 31 日
Firstly, I would use the polarplot function instead of polar. Then you couls just plot a single point at the coordinate that you want to display the elements?
%======================
%Your code
n=2;
k=2;
delta=pi/120;
phi=0:0.0001:2*pi;
s=((2*pi*cos(phi)/k)+delta);
E=(sin(n*s/2))./(n*sin(s/2));
a=[phi,E];
plot(s);
hFig = figure;
L1 = polarplot(phi, abs(E));
pax = gca;
hold on;
polarplot(pax,0,0.25,'ro')
polarplot(pax,pi,0.25,'ro')
The rest of it is just formatting options:
pax.RLim = [0 1.2];
pax.RTick = [0:0.2:1];
pax.ThetaLim = [-180 180];
L1.LineWidth = 2;
hFig.Color = [1 1 1];
%Title('Two-element...');

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by