fid = fopen(tmpScriptFile, ‘wt’);% 建立一个新的HFSS project和design.hfssNewProject(fid);hfssInsertDesign(fid, ‘gradually_changed_tri_transmissionLine’);
% 创建新的PolylinePoints=zeros(2*tot_num,3);for num=1:tot_num Points(num,1:3)=[-Wcal(num)/2,(num-1)*dL,0];endPoints((tot_num+1):end,1)=abs(flipud(Points(1:tot_num,1)));Points((tot_num+1):end,2)=flipud(Points(1:tot_num,2));Points((tot_num+1):end,3)=flipud(Points(1:tot_num,3));hfssPolyline(fid, ‘exp_transmissionLine’, Points, ‘mm’, 1, ‘Line’, [255, 255, 0],0)hfssSetColor(fid, ‘exp_transmissionLine’, [255,255,0]); hfssSetTransparency(fid, {‘exp_transmissionLine’}, 0); hfssAssignPE(fid, ‘Line’, {‘exp_transmissionLine’});
% Create the substratehfssBox(fid, ‘substrate’,[-40/2,0,0],[40,L,-H],‘mm’,1);hfssAssignMaterial(fid, ‘substrate’, ‘Rogers RT/duroid 5880 (tm)’); hfssSetTransparency(fid, {‘substrate’}, 0.2);
% Create the groundhfssRectangle(fid, ‘GroundPlane’, ‘Z’, [-40/2,0,-H],40,L, ‘mm’,1); hfssSetColor(fid, ‘GroundPlane’, [192, 192, 192])