フィルターのクリア

this is my coding for beamplot. i have problem with polar plots. it is not working well. can anyone help me with this one. thanks in advance.

1 回表示 (過去 30 日間)
close all;clear all;
freq=400e6;%input('frequency (e.g 900e6 for 900MHz):');
lambda=3e8/freq
d_ratio=2;%input('ratio of lambda/d:');
d=1/2;%lambda/d_ratio;
M=7;%input('M, number of elements:');
phi_s=50;%input('angle of interest(-90 to 90):');
u_s=(d/lambda)*sin(phi_s*pi/180);
x=5; %step up for plotting graph
SS=zeros(M,1);
ZZ=zeros(1,M);
YY=zeros(1,(180/x));
s=exp(-i*2*pi*u_s*(0:(M-1)))/sqrt(M);
s=s';
c_mf=s';
J=0;
for angle=-180:x:180
J=J+1;
W=zeros(1,M);
u_s=(d/lambda)*sin(angle*pi/180);
SS=zeros(M,1);
for I=1:M
SS(I,1)=exp(-i*2*pi*u_s*(I-1))/sqrt(M);
end
YY(:,J)=c_mf*SS;
end
YY=abs(YY);
YY=YY/max(YY);
J=0;
angle=-180:x:180;
figure(1),close all
plot(angle,YY,'m'), axis([-90 90 0 1]),hold on;
figure(2);
polar(angle,YY,'m');*%this doesn't work well, the polar graph is wrong *
  1 件のコメント
Walter Roberson
Walter Roberson 2011 年 11 月 13 日
You will need to describe what you want the plot to look like, and what you see instead.

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

回答 (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