clear
clc
x=[389129.4009 410324.2036 440037.0414
139733.0287 127944.6977 125264.8684
402390.1462 342889.3714 342839.3757
];
a=min(x);
b=max(x);
[n,m]=size(x);
k=1/log(n);
for i=1:n
for j=1:m
x(i,j)=(x(i,j)-a(j))/(b(j)-a(j))*100; %高优指标处理
end
end
for i=1:n
for j=1:m
x(i,j)=(b(j)-x(i,j))/(b(j)-a(j))*100; %低优指标处理
end
end
he=sum(x);
for i=1:n
for j=1:m
p(i,j)=x(i,j)/he(j);
end
end %指标归一化
for i=1:n
for j=1:m
if p(i,j)==0
z(i,j)=0;
else
z(i,j)=log(p(i,j));
end
end
end
e=zeros(1,m);
for i=1:1n
for j=1:m
e(j)=e(j)+p(i,j)*z(i,j)*(-k);
end
end
he=sum(e);
for i=1:m
g(i)=1-e(i)/(m-he)
end
for i=1:m
w(i)=g(i)/sum(g); %计算权重
end
s=zeros(1,n);
for i=1:n %计算综合得分
for j=1:m
s(i)=s(i)+w(j)*p(i,j);
end
end
t=3;
plot(t,s,'b*-')
MATLAB.rar_信息熵MATLAB_信息熵权_影响评价_权重判断_离散熵值
版权申诉
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
![avatar](https://profile-avatar.csdnimg.cn/c7605ebd585249f1b630f560f4d9ba6f_weixin_42650811.jpg!1)
我虽横行却不霸道
- 粉丝: 77
- 资源: 1万+
最新资源
- 毕设项目:通用作业批改管理系统(含源代码+毕设文档+ASP.NET)
- 数据库管理工具:dbeaver-ce-24.0.5-x86-64-setup.exe
- 数据库管理工具:dbeaver-ce-24.0.5-stable.x86-64.rpm
- 数据库管理工具:dbeaver-ce-24.0.5-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-24.0.5-macos-aarch64.dmg
- MPU6050基于STM32 HAL的驱动程序
- 基于 stm32“蓝色药丸”的简单 cdc 到 gpio 控制器
- 编程实战:基于ASP.NET技术的图书馆管理信息系统(含源代码+文档+任务书)
- 织梦网站标题和内容body文字自动转unicode码插件
- 数据库管理工具:dbeaver-ce-24.0.4-x86-64-setup.exe
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
评论1