Hi Sergio,
this should work. Please check carefully against the results of the old code
xm = Array[x, {10, 10}];
For[i = 1, i <= 10, i++,
xi = (N[i] - 0.5) h;
x[i, i] = const * Log[0.44705*h*xi*2.];
For[j = 1, j <= 10, j++,
If[i == j, Break[]];
xj = (N[j] - 0.5) h;
x[i, j] = const* Log[Abs[xi - xj]* Abs[xi + xj]];
x[j, i] = x[i, j];
]
]
Here you can see the structure of the matrix before putting in the numbers
MatrixForm[xm]
Finally the variables are replaced by the numeric values
prms = {g -> 1.*10^8 / 2.83, freq -> 377., h -> 5.*10 (-3),
perm -> 4.* \[Pi]* 10^(-7), eo -> 1.};
MatrixForm[xm] /. const -> (freq * perm* g * h^2) / (2. \[Pi]) /. prms