📄 sa_fig3_16.m
字号:
% Smart Antennas figure 3.16 calculate the polar patterns for the finite length dipole and the 3-D patterns
% Lolam= L/lambda;
th=-pi:.01:pi;
lolam=.5:.5:1.5;
u1=((cos(pi*lolam(1)*cos(th))-cos(pi*lolam(1)))./sin(th)).^2;
u2=((cos(pi*lolam(2)*cos(th))-cos(pi*lolam(2)))./sin(th)).^2;
u3=((cos(pi*lolam(3)*cos(th))-cos(pi*lolam(3)))./sin(th)).^2;
u1=u1/max(u1);
u2=u2/max(u2);
u3=u3/max(u3);
figure;
polar(th,u1,'k')
hold on
polar(th,u2,'k:')
hold on
polar(th,u3,'k--')
hold off
view(90,-90)
% Calculate the 3-D patterns for finite length dipoles of length L/lambda = .5, 1, 1.5
% use 100 data points in theta and 100 data points in phi
set(0,'defaultfigurecolor','w')
tend=pi;
% change L for each plot required
L=1.5;
fx=inline('((cos(pi*1.5*cos(theta))-cos(pi*1.5))/sin(theta))^2*sin(theta)*cos(phi)');
fy=inline('((cos(pi*1.5*cos(theta))-cos(pi*1.5))/sin(theta))^2*sin(theta)*sin(phi)');
fz=inline('((cos(pi*1.5*cos(theta))-cos(pi*1.5))/sin(theta))^2*cos(theta)');
maxx=max(((cos(pi*L*cos(th))-cos(pi*L))./sin(th)).^2);
figure;
ezmesh(fx,fy,fz,[0,pi,0,2*pi],100)
colormap([0 0 0])
axis([-maxx maxx -maxx maxx -maxx maxx])
view(0,24)
grid off
axis off
title .
zoom(1.5)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -