clc,clear,close all
a=[1,1,1,4,1,1/2
1,1,2,4,1,1/2
1,1/2,1,5,3,1/2
1/4,1/4,1/5,1,1/3,1/3
1,1,1/3,3,1,1
2,2,2,3,3,1];
[x,y]=eig(a);%求特征值
eigenvalue=diag(y);%提取y矩阵的对角值
lamda=eigenvalue(1);
ci1=(lamda-6)/5;
cr1=ci1/1.24;
w1=x(:,1)/sum(x(:,1)) %准则层权值
%% 准则层1
b1=[1,1/4,1/2;4,1,3;2,1/3,1];
[x,y]=eig(b1);
eigenvalue=diag(y);
lamda=eigenvalue(1);
ci21=(lamda-3)/2;
cr21=ci21/0.58;
w21=x(:,1)/sum(x(:,1))%研究课题
%% 准则层2
b2=[1 1/4 1/5;4 1 1/2;5 2 1];
[x,y]=eig(b2);
eigenvalue=diag(y);
lamda=eigenvalue(1);
ci22=(lamda-3)/2;
cr22=ci22/0.58;
w22=x(:,1)/sum(x(:,1))%发展前途
%% 准则层3
b3=[1 3 1/3;1/3 1 1/7;3 7 1];
[x,y]=eig(b3);
eigenvalue=diag(y);
lamda=eigenvalue(1);
ci23=(lamda-3)/2;
cr23=ci2
MATLAB数学建模经典分享五---求特征值和准测层权值
最新推荐文章于 2022-07-04 19:32:11 发布