(* MATHEMATICA 熵值法 *)
(* 注意矩阵的格式 *)
x={
{99.3600,380952974700.0000,104.8900,1.6400,9.0500,8.2800,101452980.1100,1167334984012.1600,102.1300,228127.0000,5304940.0000,29817.0000},
{92.1100,466610267000.0000,111.6500,4.3300,5.4400,8.1600,75883744.8300,861424359113.9300,94.6000,1253922.0000,8087900.0000,85194.0000},
{109.1000,305694698312.7900,110.8800,2.6900,4.1700,8.4000,457459478.2500,1179235081612.4700,110.0600,468307.0000,677090.0000,63273.0000},
{109.1000,595020144866.6500,99.3000,2.0100,4.5700,4.3000,783157007.2100,5007646096891.2900,109.2600,1993306.0000,1930440.0000,65491.0000},
{98.2200,372654923215.5300,107.1300,1.4400,8.5100,23.8000,18848868.8700,704821878325.1800,101.1000,162951.0000,62990.0000,22051.0000},
{104.6500,365675537000.0000,111.7600,2.1400,5.0200,9.3900,27417364.3700,89952506168.7600,104.3300,87487.0000,670.0000,5195.0000},
{101.2900,366895501851.6100,101.8200,1.9400,8.5100,5.5800,11549288.9200,1258455637300.0000,103.9700,309613.0000,1539200.0000,9674.0000},
{100.8500,392520087435.9700,106.2700,0.7600,9.5300,8.6500,19599155.2300,48932431697.2000,101.4400,82859.0000,305990.0000,25023.0000},
{96.3600,347542443470.0800,99.6000,1.2600,9.6900,18.0100,22939492.6400,1297226915351.5100,99.0900,29917.0000,172930.0000,15043.0000},
{97.3700,100.0000,99.6400,4.6800,16.2100,9.2600,158995068.0700,15077285740000.0000,98.4000,1688822.0000,3021080.0000,226205.0000}
};
m=Dimensions[x][[1]];
n=Dimensions[x][[2]];
y=Table[0, {i, m}, {j, n}];
(* 原始矩阵归一化 *)
For[i = 1, i <= n, i++, y[[All, i]] = x[[All, i]]/Total[x][[i]] ]
p=Table[0, {j, n}];
s=Table[0, {j, n}];
For[L = 1, L <= n, L++,
s[[L]]=0;
For[j = 1, j <= m, j++,
p[[L]]=y[[j,L]]*Log[ y[[j,L]] ];
s[[L]]=s[[L]]+p[[L]];
]
]
k=(Log[m])^(-1.);
e=-k*s;
h=Table[1, {j, n}] - e;
(* 指标权重值 *)
w=h/Sum[h[[i]], {i, n}]
Sum[w[[i]], {i, n}]
(* 计算综合评价值 *)
g=y.w