필터 지우기
필터 지우기

reflectorC​rossedDipo​leElement(​fq)

조회 수: 2 (최근 30일)
RAKOTOSON Tsiory
RAKOTOSON Tsiory 2022년 1월 16일
답변: Satyanand Singh 2023년 4월 11일
In 5G planning example, i have this : "txElement = reflectorCrossedDipoleElement(fq);"....and It Works in live script, but why not when i use it in command window or my code?
Thank you for your answer,
PS: i use matlab r2021a

답변 (1개)

Satyanand Singh
Satyanand Singh 2023년 4월 11일
%%%%%you have to save this function file
function element = reflectorCrossedDipoleElement(fq, showAntenna)
%reflectorCrossedDipoleElement Design reflector-backed crossed dipole antenna element
if nargin < 2
showAntenna = false;
end
lambda = physconst("lightspeed")/fq;
offset = lambda/50;
gndspacing = lambda/4;
gndLength = lambda;
gndWidth = lambda;
% Design crossed dipole elements
d1 = design(dipole,fq);
d1.Tilt = [90,-45];
d1.TiltAxis = ["y","z"];
d2 = copy(d1);
d2.Tilt = 45;
d2.TiltAxis = "x";
% Design reflector
r = design(reflector,fq);
r.Exciter = d1;
r.GroundPlaneLength = gndLength;
r.GroundPlaneWidth = gndWidth;
r.Spacing = gndspacing;
r.Tilt = 90;
r.TiltAxis = "y";
if showAntenna
show(r)
end
% Form the crossed dipole backed by reflector
refarray = conformalArray;
refarray.ElementPosition(1,:) = [gndspacing 0 0];
refarray.ElementPosition(2,:) = [gndspacing+offset 0 0];
refarray.Element = {r, d2};
refarray.Reference = "feed";
refarray.PhaseShift = [0 90];
if showAntenna
show(refarray);
view(65,20)
end
% Create custom antenna element from pattern
[g,az,el] = pattern(refarray,fq);
element = phased.CustomAntennaElement;
element.AzimuthAngles = az;
element.ElevationAngles = el;
element.MagnitudePattern = g;
element.PhasePattern = zeros(size(g));
end
function element = reflectorDipoleElement(fq)
%reflectorDipoleElement Design reflector-backed dipole antenna element
% Design reflector and exciter, which is vertical dipole by default
element = design(reflector,fq);
element.Exciter = design(element.Exciter,fq);
% Tilt antenna element to radiate in xy-plane, with boresight along x-axis
element.Tilt = 90;
element.TiltAxis = "y";
element.Exciter.Tilt = 90;
element.Exciter.TiltAxis = "y";
end

카테고리

Help CenterFile Exchange에서 Antennas, Microphones, and Sonar Transducers에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by