当前位置:网站首页>Matlab tips (16) consistency verification of matrix eigenvector eigenvalue solution -- analytic hierarchy process
Matlab tips (16) consistency verification of matrix eigenvector eigenvalue solution -- analytic hierarchy process
2022-07-01 08:35:00 【mozun2020】
MATLAB Tips (16) Consistency verification of eigenvalue solution of matrix eigenvector -- Analytic hierarchy process
Preface
MATLAB Learning about image processing is very friendly , You can start from scratch , There are many encapsulated functions that can be called directly for basic image processing , This series of articles is mainly to introduce some of you in MATLAB Some concept functions are commonly used in routine demonstration !
The eigenvalues and eigenvectors of the matrix are solved , According to the maximum eigenvalue and the corresponding eigenvector , The feature vector of criterion layer and the maximum feature root of criterion layer are obtained , Then calculate the consistency inspection parameters , If the threshold is satisfied, the consistency verification is satisfied , If the threshold is not met, it needs to be re scored .
The example encountered when searching for data , Here to share ,MATLAB Version is MATLAB2015b.
One . MATLAB Simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function : Consistency verification of eigenvalue solution of matrix eigenvector -- Analytic hierarchy process example
% Environmental Science :Win7,Matlab2015b
%Modi: C.S
% Time :2022-06-24
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Clear environment variables
clear all
clc
tic
A=[1 1/5 1 1/5 1/6 1/6
5 1 5 1/2 1/2 1/2
2 1/5 1 1/4 1/6 1/4
5 1/2 4 1 1/2 1/2
6 2 6 2 1 1
6 2 4 2 1 1]
[n,n]=size(A);
[V,D]=eig(A);% Get the eigenvector and eigenvalue
% Find the maximum eigenvalue and its corresponding eigenvector
tempNum=D(1,1);
pos=1;
for h=1:n
if D(h,h)>tempNum
tempNum=D(h,h);
pos=h;
end
end
w=abs(V(:,pos));
w=w/sum(w);
t=D(pos,pos);
disp(' Criterion layer eigenvector w=');disp(w);disp(' Maximum characteristic root of criterion layer t=');disp(t);
% The following is the consistency test
CI=(t-n)/(n-1);RI=[0 0 0.58 0.89 1.12 1.26 1.36 1.41 1.46 1.49 1.52 1.54 1.56 1.58 1.59 1.60 1.61 1.615 1.62 1.63];
CR=CI/RI(n);
if CR<0.10
disp(' The consistency of this matrix is acceptable !');
disp('CI=');disp(CI);
disp('CR=');disp(CR);
else
disp(' Consistency verification of this matrix failed , Please re rate !');
end
toc
Two . Simulation results
A =
1.0000 0.2000 1.0000 0.2000 0.1667 0.1667
5.0000 1.0000 5.0000 0.5000 0.5000 0.5000
2.0000 0.2000 1.0000 0.2500 0.1667 0.2500
5.0000 0.5000 4.0000 1.0000 0.5000 0.5000
6.0000 2.0000 6.0000 2.0000 1.0000 1.0000
6.0000 2.0000 4.0000 2.0000 1.0000 1.0000
Criterion layer eigenvector w=
0.0425
0.1677
0.0546
0.1580
0.2976
0.2797
Maximum characteristic root of criterion layer t=
6.0846
The consistency of this matrix is acceptable !
CI=
0.0169
CR=
0.0134
Time has passed 0.007250 second .

3、 ... and . Summary
Examples of consistency verification , It may be used later , Take a note here . Learn one every day MATLAB Little knowledge , Let's learn and make progress together !
边栏推荐
- Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
- 機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
- Leetcode t31: prochain arrangement
- Luogu p3799 demon dream stick
- 01 NumPy介绍
- Model and view of QT
- Matlab tips (23) matrix analysis -- simulated annealing
- DID的使用指南,原理
- How to use OKR as the leadership framework of marketing department
- Provincial election + noi Part VII computational geometry
猜你喜欢
随机推荐
SPL-介绍(一)
To prevent "activation" photos from being muddled through, databao "live detection + face recognition" makes face brushing safer
In depth learning training sample amplification and tag name modification
[untitled]
Tita OKR: a dashboard to master the big picture
Leetcode T39: 组合总和
1.jetson与摄像头的对接
What is the material of 15CrMoR, mechanical properties and chemical analysis of 15CrMoR
公网集群对讲+GPS可视追踪|助力物流行业智能化管理调度
电脑小技巧
Thread safety analysis of [concurrent programming JUC] variables
Yolov5 advanced six target tracking environment construction
On several key issues of digital transformation
《微机原理》-绪论
Provincial selection + noi Part II string
Leetcode T29: 两数相除
Matlab tips (23) matrix analysis -- simulated annealing
一文纵览主流 NFT 市场平台版税、服务费设计
01 NumPy介绍
截图小妙招




![[untitled]](/img/40/560c597d53d27eff860644cd7c3030.png)




