hfss matrix data
For those who are interested in the solution...
Rewrite the function "hfssExportNetworkData.m":
(eps, Leitfaeh, tanDelta are the variables which are determined by HFSS Optimization.)
function hfssExportNetworkData_Opt(fid, fileName, setupName, sweepName, path, ...
varargin)
% Export File Type - default is MATLAB.
if (length(varargin) > 0)
expFileType = varargin{1};
else
expFileType = 'm';
end;
% Renormalizing Impedance.
if (length(varargin) > 1)
renormZ = varargin{2};
else
renormZ = 50.0;
end;
% Export File Type Switch.
switch (expFileType)
case 'h', expType = 1;
case 't', expType = 2;
case 's', expType = 3;
case 'c', expType = 4;
case 'm', expType = 7;
case 'z', expType = 8;
otherwise, error('Export File Type Unknown !');
end;
fprintf(fid, '\n');
% Get the project variables values:
fprintf(fid, 'eps = oProject.GetVariableValue("$eps") \n');
fprintf(fid, 'Leitfaeh = oProject.GetVariableValue("$Leitfaeh") \n');
fprintf(fid, 'tanDelta = oProject.GetVariableValue("$tanDelta") \n');
% The usual fprintf()'s
fprintf(fid, '\n');
fprintf(fid, 'Set oModule = oDesign.GetModule("Solutions")\n');
fprintf(fid, 'oModule.ExportNetworkData _\n');
fprintf(fid, ' "$Leitfaeh=''" + Leitfaeh + "'' $eps=''" + eps + "'' $tanDelta=''" + tanDelta + "''", _\n');
fprintf(fid, ' Array("%s:%s"), _\n', setupName, sweepName);
fprintf(fid, ' %d, _\n', expType);
fprintf(fid, ' "%s", _\n', fileName);
fprintf(fid, ' Array("All"), _\n');
fprintf(fid, ' true, _\n');
fprintf(fid, ' %.2f \n', renormZ);