当前位置:网站首页>层次分析法(MATLAB)
层次分析法(MATLAB)
2022-07-23 13:12:00 【Wolves_YY】
本文借鉴了数学建模清风老师的课件与思路,可以点击查看链接查看清风老师视频讲解:清风数学建模:https://www.bilibili.com/video/BV1DW411s7wi
直接看下面这个博客即可,此处为对这个博客的补充。
一致性检验不通过怎么办?如下图:

程序
clc,clear
disp('请输入判断矩阵A')
A=input('A=');
[n,n] = size(A);
% % % % % % % % % % % % %方法1: 算术平均法求权重% % % % % % % % % % % % %
Sum_A = sum(A);
SUM_A = repmat(Sum_A,n,1);
Stand_A = A ./ SUM_A;
disp('算术平均法求权重的结果为:');
disp(sum(Stand_A,2)./n)
% % % % % % % % % % % % %方法2: 几何平均法求权重% % % % % % % % % % % % %
Prduct_A = prod(A,2);
Prduct_n_A = Prduct_A .^ (1/n);
disp('几何平均法求权重的结果为:');
disp(Prduct_n_A ./ sum(Prduct_n_A))
% % % % % % % % % % % % %方法3: 特征值法求权重% % % % % % % % % % % % %
[V,D] = eig(A);
Max_eig = max(max(D));
[r,c]=find(D == Max_eig , 1);
disp('特征值法求权重的结果为:');
disp( V(:,c) ./ sum(V(:,c)) )
% % % % % % % % % % % % %下面是计算一致性比例CR的环节% % % % % % % % % % % % %
CI = (Max_eig - n) / (n-1);
RI=[0 0.0001 0.52 0.89 1.12 1.26 1.36 1.41 1.46 1.49 1.52 1.54 1.56 1.58 1.59]; %注意哦,这里的RI最多支持 n = 15
% 这里n=2时,一定是一致矩阵,所以CI = 0,我们为了避免分母为0,将这里的第二个元素改为了很接近0的正数
CR=CI/RI(n);
disp('一致性指标CI=');disp(CI);
disp('一致性比例CR=');disp(CR);
if CR<0.10
disp('因为CR<0.10,所以该判断矩阵A的一致性可以接受!');
else
disp('注意:CR >= 0.10,因此该判断矩阵A需要进行修改!');
end里面的变量n为指标的个数,本案例中n为5 。
在实际运用中,只需将判断矩阵输入程序即可。在本例中,表现为下面6个判断矩阵:

边栏推荐
- Royal O'Brien, executive director of o3df: open source has no boundaries, and all shared sounds will become the actual direction
- Niuke-top101-bm36
- pytest接口自动化测试框架 | 多进程运行用例
- 学习笔记7--交通环境行为预测
- 腾讯云获国际专业流媒体测评肯定:三大场景下视频编码性能全部最优
- Scale Match for Tiny Person Detection
- Tan Zhangxi, director of risc-v Foundation: risc-v has gradually expanded from the edge to the center
- pytest接口自动化测试框架 | 如何获取帮助
- 启牛商学院上面开户安全不
- Practice code - day one
猜你喜欢

go run,go build,go install有什么不同

動態規劃背包問題之完全背包詳解

C#入门系列(二十八) -- LINQ的查询语法

IIS 部署.NetCore

Study note 7 -- traffic environment behavior prediction

The competition boss is in Huawei: network experts are from Stanford physics department, and some people "work as much as reading a doctoral degree"

tensorflow2.X实战系列softmax函数

RISC-V基金会董事谭章熹:RISC-V,从边缘逐渐向中央扩展

anchor free yolov1

练习代码----第一天
随机推荐
pytest接口自动化测试框架 | pytest生成简单测试报告
【笔记】线性回归
YOLOV7
YOLOv4: Optimal Speed and Accuracy of Object Detection
Several common SQL misuses in MySQL
Software detailed design template
pytest接口自动化测试框架 | 控制测试用例执行
(已解决)idea编译Gradle项目提示 错误找不到符号
Oracle中实现删除指定查询条件的所有数据
RISC-V基金会董事谭章熹:RISC-V,从边缘逐渐向中央扩展
Detector: detect objects with recursive feature pyramid and switchable atolos convolution
TS encapsulates the localstorage class to store information
15001. System design scheme
Nport serial server principle, moxa serial server nport-5130 detailed configuration
FIO performance testing tool
华为新版Datacom认证介绍
智慧民航新业态崭露头角,图扑数字孪生入局民航飞联网
Purpose of wsastartup function
COPU副主席刘澎:中国开源在局部领域已接近或达到世界先进水平
一款非常棒的开源微社区轻论坛类源码