8
/* We calculate the full Z matrix. Since the matrix is symmetrical, we only
9
need compute Z_i,j for j=1 to i. The function mutual, filles in Zji, when
10
we ask it to fill in Zij. */
12
void fill_z_matrix(double frequency, int driven, int parasitic, double **d, double **p, double **impedance)
15
int i,j, elements=driven+parasitic;
16
for(i=1;i<=elements;++i) /* for every antenna element */
20
if(i==j) /* Need self impedance */
24
self_impedance(i, frequency, driven, parasitic, d, impedance);
26
else if (i > driven ) /* parasitic element */
28
self_impedance(i, frequency, driven, parasitic, p, impedance);
31
else if (i != j) /* need mutual impedance */
33
mutual_impedance(i,j,frequency,driven,parasitic, d, p, impedance);
41
fprintf(stderr,"Errno =%d in z.c\n", errno);