Hello everyone,
I am trying to use Matlab to control the "FasterCap" program. My code looks like:
------------------
path_to_input='C:\Users\Public\Documents\FastFieldSolvers\FasterCap\2D\three_line_bus_2d__single_file.lst';
ax=actxserver('FasterCap.Document');
ax.invoke('ShowWindow');
ax.invoke('Run',[path_to_input, ' -a0.001']);
while(ax.invoke('Isrunning'))
pause(0.1);
end
C=cell2mat(ax.invoke('GetCapacitance'));
ax.invoke('Quit');
----------------------
As you can see, I am running the "three_line_bus_2d__single_file" file from the example directory.
The code runs pretty well, but there is a discrepancy between the results from FasterCap, and the results I end up having in Matlab.
Specifically, after the last iteration in FasterCap, I get the following Capacitance matrix:
Capacitance matrix is:
Dimension 3 x 3
g1_microstrip 1.4166e-010 -2.15784e-011 -8.64043e-013
g2_microstrip -2.16601e-011 9.33457e-011 -1.80683e-011
g3_microstrip -8.96116e-013 -1.80545e-011 8.78264e-011
On the other hand, the variable 'C' in the above Matlab code, gets populated with the following values:
C =
2.5464 -0.3879 -0.0155 -2.1710
-0.3893 1.6779 -0.3248 -0.9937
-0.0161 -0.3245 1.5787 -1.2724
I am not sure where is the discrepancy coming from.
Thanks in advance.
Amr