Dipole Antenna : 2

Characteristics of dipole antenna.

%%
% characteristics of dipole antenna
% author : Leon
% email:[email protected]
% url : www.cnblogs.com/hiramlee0534

%%
close all;
clear all;
clc;
global k;
global l;

M = 50;% numbers pattern of different length
N = 1000; % numbers of theta
theta = linspace(-pi, pi, N);
lamda = 1 ; % wavelength
k = 2*pi/lamda; % wave number


%%
% radiation pattern
fig = figure('color','white');
title('radiation pattern of dipole antenna');

for i = 1:1:M
    l = i/M*2*lamda;
f =(cos(k*l*cos(theta))-cos(k*l))./sin(theta);
f = abs(f)/max(abs(f));
polar(theta,f);
xlabel(strcat('antenna length is  ', num2str(l*2),' lamda'));
pause(0.1);
MF(i) = getframe(gcf);
end

%%
% radiation resistance
for i = 1:1:M
    l = i/M*2*lamda;
    r(i) = quad('Fr',0, pi);
end
figure;
plot((1:1:M)/M*2*lamda,r);
title('radiation resistance of dipole antenna');
xlabel('antenna length');
ylabel('radiation resistance');

你可能感兴趣的:(Dipole Antenna : 2)