0001 function [c_streng_s, f_leng_s] = make_symmetry_matrix(c_streng, f_leng)
0002
0003
0004
0005
0006
0007
0008
0009
0010 Nvact = size(c_streng,1);
0011 c_streng_s = c_streng;
0012 f_leng_s = f_leng;
0013
0014 for ii = 1:Nvact
0015 for jj = (ii+1):Nvact
0016 if c_streng(ii,jj)||c_streng(jj,ii)
0017
0018
0019
0020
0021
0022
0023
0024 mean_c_streng = 0.5*(c_streng(ii,jj) + c_streng(jj,ii));
0025 c_streng_s(ii,jj) = max(c_streng(ii,jj),c_streng(jj,ii));
0026 c_streng_s(jj,ii) = max(c_streng(ii,jj),c_streng(jj,ii));
0027 weighed_mean_f_leng = ...
0028 (c_streng(ii,jj)*f_leng(ii,jj) + c_streng(jj,ii)*f_leng(jj,ii))...
0029 /(2*mean_c_streng);
0030 f_leng_s(ii,jj) = weighed_mean_f_leng;
0031 f_leng_s(jj,ii) = weighed_mean_f_leng;
0032
0033 end
0034 end
0035 end
0036
0037