当前位置:网站首页>Matlab analytic hierarchy process to quickly calculate the weight
Matlab analytic hierarchy process to quickly calculate the weight
2022-04-23 20:20:00 【Install a sound 77】
Analytic hierarchy process (AHP) is a very useful decision algorithm
Although the content is equal to patting the head , But sometimes we just need to find the right way to pat our heads .
Although it is often used to solve the problem of multi-objective selection , But we can also analyze the factors , Get a factor weight .
Of course, the weight of each factor , An evaluation matrix needs to be established ( That is, pat your head )
This paragraph matlab The code immediately uses the evaluation matrix to calculate the content of weight , It is equivalent to the first half of the goal decision , Very simple and practical .
% Analytic hierarchy process
A=[1 1/4 1/2 1/3 1/9;4 1 3 2 1/4;2 1/3 1 1/2 1/7;3 1/2 2 1 1/5;9 4 7 5 1];
[n,n]=size(A);
x=ones(n,100);
y=ones(n,100);
m=zeros(1,100);
m(1)=max(x(:,1))
y(:,1)=x(:,1);
x(:,2)=A*y(:,1);
m(2)=max(x(:,2))
y(:,2)=x(:,2)/m(2);
p=0.0001;i=2;k=abs(m(2)-m(1));
while k>p
i=i+1;
x(:,i)=A*y(:,i-1);
m(i)=max(x(:,i));
y(:,i)=x(:,i)/m(i);
k=abs(m(i)-m(i-1));
end
a=sum(y(:,i));
31
w=y(:,i)/a;
t=m(i)
disp(w)
[v,d]=eig(A);
r=d(1,1);
CI=(r-n)/(n-1);
RI=[0 0 0.58 0.9 1012 1.24 1.32 1.41 1.45]
CR=CI/RI(n)
if CR<0.1
CR_result=' adopt '
else
CR_result=' Not through '
end
disp('CR_result')
版权声明
本文为[Install a sound 77]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210551491458.html
边栏推荐
- 使用 WPAD/PAC 和 JScript在win11中进行远程代码执行3
- BMP JPEG 图片转换为矢量图像 ContourTrace
- Remote code execution in Win 11 using wpad / PAC and JScript
- Sqoop imports data from Mysql to HDFS using lzop compression format and reports NullPointerException
- SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习
- JDBC tool class jdbcfiledateutil uploads files and date format conversion, including the latest, simplest and easiest way to upload single files and multiple files
- R language ggplot2 visualization: ggplot2 visualizes the scatter diagram and uses geom_ mark_ The ellipse function adds ellipses around data points of data clusters or data groups for annotation
- The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
- Implementation of mypromise
- nc基础用法
猜你喜欢
Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]
STM32 Basics
CVPR 2022 | querydet: use cascaded sparse query to accelerate small target detection under high resolution
网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)
【PTA】L1-002 打印沙漏
DTMF双音多频信号仿真演示系统
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Linux64Bit下安装MySQL5.6-不能修改root密码
MySQL advanced lock - overview of MySQL locks and classification of MySQL locks: global lock (data backup), table level lock (table shared read lock, table exclusive write lock, metadata lock and inte
Sqoop imports tinyint type fields to boolean type
随机推荐
JDBC tool class jdbcfiledateutil uploads files and date format conversion, including the latest, simplest and easiest way to upload single files and multiple files
nc基础用法3
Click an EL checkbox to select all questions
After route link navigation, the sub page does not display the navigation style problem
[graph theory brush question-4] force deduction 778 Swimming in a rising pool
16MySQL之DCL 中 COMMIT和ROllBACK
Is the wechat CICC wealth high-end zone safe? How to open an account for securities
Leetcode dynamic planning training camp (1-5 days)
Cadence OrCAD capture batch change component packaging function introduction graphic tutorial and video demonstration
Markdown < a > tag new page open link
R language ggplot2 visual facet_wrap, and use the lineheight parameter to customize the height of the facet icon tab (gray label bar)
Confusion about thread blocking after calling the read () method of wrapper flow
Operation of numpy array
微信中金财富高端专区安全吗,证券如何开户呢
How to protect ECs from hacker attacks?
R language ggplot2 visualization: ggplot2 visualizes the scatter diagram and uses geom_ mark_ The ellipse function adds ellipses around data points of data clusters or data groups for annotation
論文寫作 19: 會議論文與期刊論文的區別
Grafana shares links with variable parameters
Redis的安装(CentOS7命令行安装)
Sqoop imports tinyint type fields to boolean type