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

📄 yagipoyntingsimulate.m

📁 天线设计方面的资料
💻 M
字号:
function YagiSimulate(handles)
% this function will export the final design to 
% superNEC for further simulation

% INPUTS: 
%   modelFreq: The frequency at which the SNEC structure is designed
%   obj.location: The location of the assembly 
%   obj.segLength: The segment length in wavelengths 
%   obj.orientation: The orientation of the assembly 
%   obj.freqScale: The factor by which the model freq. is scaled 
%   obj.spacing: The spacing between the elements 
%   obj.len: The length of the yagi elements 
%   obj.radii: The radii of the yagi elements 
   
snecin
clear snres;
strdll ('New');

% snecFileName = ['c:\MATLAB7\snec\matlab\YagiPlot.nec'];
% outputFileName = ['c:\MATLAB7\snec\matlab\YagiPlot.out'];

clear snres;

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;

radius = (get(handles.Parameter7,'Value')/2)*lambda;


spa = 0.2*lambda;
if ~get(handles.Units,'Value')
    boomlength = boomlength*lambda;
    dir_len = dir_len*lambda;
    driven_len = driven_len*lambda;
    ref_len = ref_len*lambda;
end

spacing = zeros(dir_no+1,1)+spa;
spacing(2) = (boomlength - (spa*dir_no));
radii = zeros(dir_no+2,1) + radius;
elements = zeros(dir_no + 2,1);
elements(1) = ref_len;
elements(2) = driven_len;
elements(3:dir_no+2) = repmat(dir_len,dir_no,1);

strdll ('SetModelFreq', Frequency);

obj.location = [0.000, 0.000, 0.000];
obj.segLength = 0.100;
obj.orientation = [0.000, 0.000, 0.000];
obj.freqScale = 1.000;    
obj.spacing = spacing';
obj.len = elements';
obj.radii = radii';

% Segment the yagi using the yagi assembly
yagi = snyagi(Frequency, obj, 0);

% Add it to the structure.
strdll ('AddAssembly', yagi);

⌨️ 快捷键说明

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