⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yagipoyntingdraw.m

📁 天线设计方面的资料
💻 M
字号:
function YagiPoyntingDraw(handles)

boomlength = get(handles.Parameter1,'Value');
dir_no = get(handles.Parameter3,'Value')-2;
ref_len = get(handles.Parameter4,'Value');
dir_len = get(handles.Parameter5,'Value');
driven_len = get(handles.Parameter6,'Value');
Frequency = str2num(get(handles.Frequency,'String'));

lambda = 300/Frequency;

set(handles.Wizard,'CurrentAxes',handles.antenna)

%set(handles.antenna,'XMinorTick','on');
load 'YagiPoyntingParameters' DirectorSpacing ReflectorSpacing BL
if get(handles.Units,'Value')
   index = find(round(boomlength*10/lambda)/10 <= BL);
else
    index = find(boomlength <= BL);
end
if isempty(index)
    index = 1;
end
index = index(1);
ReflectorSpacing = ReflectorSpacing(index);
% ReflectorSpacing = ReflectorSpacing(numel(ReflectorSpacing));
DirectorSpacing = DirectorSpacing(index);
% DirectorSpacing = DirectorSpacing(numel(DirectorSpacing));
LineWidth = 2;
if get(handles.Units,'Value')
    ReflectorSpacing = ReflectorSpacing*lambda;
    DirectorSpacing = DirectorSpacing*lambda;
end
% spa1 = (boomlength - (DirectorSpacing*dir_no)) + ReflectorSpacing;
spa1 = DirectorSpacing + ReflectorSpacing;

% Plot the Boom
plot([0 boomlength],[0 0],'k','LineWidth',LineWidth)
hold on

% plots the reflector before the other elements are plotted 
x1 = 0;
y1 = [-ref_len/2 ref_len/2];
plot ([0 0], y1,'b','LineWidth',LineWidth);

% plot the driven element
plot([ReflectorSpacing ReflectorSpacing],...
    [(-driven_len/2) (driven_len/2)],'r','LineWidth',LineWidth);

% Plot the directors
for x = 1:(dir_no)
    y1 = [(-dir_len/2) (dir_len/2)];
    x1 = [spa1 spa1];
    plot (x1,y1, 'b','LineWidth',LineWidth);
    spa1 = spa1 + DirectorSpacing;
end

axis([-ReflectorSpacing (boomlength + ReflectorSpacing)...
    ((-ref_len/2 - ReflectorSpacing/10) ) (((ref_len)/2 + ReflectorSpacing/10) )]);

plot(ReflectorSpacing,0,'sk','MarkerSize',LineWidth+4,'MarkerFaceColor','r')

hold off;

if get(handles.Grid,'Value')
    grid(handles.antenna);
end

%axis equal

title({'\bf Yagi-Uda Array','\bf Preview'})
if get(handles.Units,'Value')
    xlabel('\bf Boom Length (\rm{m}\bf)');
    ylabel('\bf Element Length (\rm{m}\bf)'); 
else
    xlabel('\bf Boom Length (\rm\lambda\bf)');
    ylabel('\bf Element Length (\rm\lambda\bf)');
end

% % Shows the antenna with equal axis markings
% set(handles.antenna,'DataAspectRatio',[1.5 1 1])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -