当前位置:网站首页>Analytic hierarchy process (matlab)
Analytic hierarchy process (matlab)
2022-07-23 23:08:00 【Wolves_ YY】
This article draws on mathematical modeling Teacher Qingfeng's courseware and ideas , You can click the view link to view the video explanation of teacher Qingfeng : Qingfeng mathematical modeling :https://www.bilibili.com/video/BV1DW411s7wi
Just look at the following blog , Here is a supplement to this blog .
Learning notes of Qingfeng mathematical modeling —— Analytic hierarchy process (AHP)
What if the consistency inspection fails ? Here's the picture :

Program
clc,clear
disp(' Please enter the judgment matrix A')
A=input('A=');
[n,n] = size(A);
% % % % % % % % % % % % % Method 1: Calculate the weight by arithmetic average % % % % % % % % % % % % %
Sum_A = sum(A);
SUM_A = repmat(Sum_A,n,1);
Stand_A = A ./ SUM_A;
disp(' The result of calculating the weight by arithmetic average method is :');
disp(sum(Stand_A,2)./n)
% % % % % % % % % % % % % Method 2: Calculate the weight by geometric average method % % % % % % % % % % % % %
Prduct_A = prod(A,2);
Prduct_n_A = Prduct_A .^ (1/n);
disp(' The result of weight calculation by geometric average method is :');
disp(Prduct_n_A ./ sum(Prduct_n_A))
% % % % % % % % % % % % % Method 3: Calculate the weight by eigenvalue method % % % % % % % % % % % % %
[V,D] = eig(A);
Max_eig = max(max(D));
[r,c]=find(D == Max_eig , 1);
disp(' The result of calculating the weight by eigenvalue method is :');
disp( V(:,c) ./ sum(V(:,c)) )
% % % % % % % % % % % % % Here is how to calculate the consistency ratio CR Link % % % % % % % % % % % % %
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]; % Watch out! , there RI Most support n = 15
% here n=2 when , It must be a uniform matrix , therefore CI = 0, In order to avoid denominator being 0, Change the second element here to be very close to 0 Positive number of
CR=CI/RI(n);
disp(' Consistency indicators CI=');disp(CI);
disp(' Consistency ratio CR=');disp(CR);
if CR<0.10
disp(' because CR<0.10, So the judgment matrix A The consistency of is acceptable !');
else
disp(' Be careful :CR >= 0.10, Therefore, the judgment matrix A Need to change !');
endThe variables inside n Is the number of indicators , In this case n by 5 .
In practice , Just input the judgment matrix into the program . In this case , As follows 6 A judgment matrix :

边栏推荐
- How does the easynvr platform turn off anonymous login?
- What if the content of software testing is too simple?
- Array - 11. Containers with the most water
- 关于电脑端同步到手机端数据
- Programming in the novel [serial 19] the moon bends in the yuan universe
- Raspberry pie SSH login
- [C language] address book (static version)
- Getting started database days2
- Interface test
- Merge.Avhd into.Vhd manually in Hyper-V
猜你喜欢
![[laser principle and Application-8]: EMC design of laser circuit](/img/98/8b7a4fc3f9ef9b7e16c63a8c225b02.png)
[laser principle and Application-8]: EMC design of laser circuit

FL Studio 20.9 update Chinese version host Daw digital audio workstation

TAP 系列文章5 | 云原生构建服务

Getting started database days2

浅析基于NVR技术的视频能力与未来发展趋势

Resolved (selenium operation Firefox Firefox browser error) attributeerror: 'webdriver' object has no attribute 'execute_ cdp_ cmd’

作为开发,你不得不知道的三个性能测试工具|Jmeter、Apipost、JMH使用指南
关于电脑端同步到手机端数据

1000 okaleido tiger launched binance NFT, triggering a rush to buy

J9 number theory: how can we overcome the fomo phenomenon in the digital industry?
随机推荐
Rails搭配OSS最佳实践
Programming in the novel [serial 19] the moon bends in the yuan universe
【Matplotlib绘图】
Wechat applet implements a global event bus by itself
The font of Siyuan notes is thinner and lighter than that in other editors (atom, VSC, sublime)
系列文章|云原生时代下微服务架构进阶之路 - 微服务拆分的最佳实践
Getting started database days2
openEuler 资源利用率提升之道 01:概论
$, $*, [email protected], $$ Understand the meaning of 0
Tap series article 9 | application development accelerator
Array - 11. Containers with the most water
Introduction and project development of MVVM and mvvmlight (I)
The I2C interface mode offline burning operation method of h7-tool has been released (2022-07-16)
[unity3d daily bug] unity3d solves "the type or namespace name" XXX "cannot be found (are you missing the using directive or assembly reference?)" Etc
Redis pipeline technology / partition
Diabetes genetic risk testing challenge baseline
Can Intel NUC replace the host_ It's finally perfect! The latest Intel NUC Mini host comes online
Niuke C basic exercises
What else do entrepreneurs need besides money? Exclusive interview with Mingyue Lake venture capital institutions
At the forefront of the times, Huawei aims at the wind and sea of digital finance