📄 ifasimulate.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.Parameter2,'Value');
ref_len = get(handles.Parameter4,'Value');
ratio = get(handles.Parameter5,'Value');
modelFreq = get(handles.Frequency,'Value');
dir_len = ref_len/ratio;
if ~get(handles.Units,'Value')
lambda = 300/modelFreq;
else
lambda = 1;
end
rad = 0.01;
spa = ((boomlength*lambda)/(dir_no-1));
for j = 1:1:(dir_no)
spaces(j) = spa;
radius(j) = rad;
if j ==1
lengths(j) = ref_len*lambda;
else
% need to decide which parameter we are gonna have to we can
% make the equation to work out either the dir length or the
% director lengths
lengths(j) = dir_len*lambda;
end;
end;
strdll ('SetModelFreq', modelFreq);
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 = spaces;
obj.len = lengths;
obj.radii = radius;
% Segment the yagi using the yagi assembly
yagi = snyagi(modelFreq, obj, 0);
% Add it to the structure.
strdll ('AddAssembly', yagi);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -