模糊层次分析法matlab,求三角模糊数层次分析法(FEAHP)模型计算的MATLAB程
时间: 2023-10-10 21:11:37 浏览: 309
模糊层次分析法的Matlab实现
3星 · 编辑精心推荐
以下是三角模糊数层次分析法(FEAHP)模型计算的MATLAB程序示例:
```matlab
clc;
clear;
% Define the fuzzy decision matrix
D = [
[1, 0.2, 0.4, 0.3];
[5, 1, 0.5, 0.2];
[2.5, 2, 1, 0.6];
[3.3, 5, 1.7, 1];
];
% Define the triangular fuzzy sets
L = [0, 0, 0.5];
M = [0, 0.5, 1];
H = [0.5, 1, 1];
% Define the weights of the criteria
w = [0.4, 0.25, 0.2, 0.15];
% Calculate the normalized decision matrix
[n, m] = size(D);
D_n = zeros(n, m);
for i = 1:n
row_sum = sum(D(i, :));
for j = 1:m
D_n(i, j) = D(i, j) / row_sum;
end
end
% Calculate the weighted normalized decision matrix
D_w = zeros(n, m);
for j = 1:m
for i = 1:n
D_w(i, j) = D_n(i, j) * w(j);
end
end
% Calculate the fuzzy synthetic evaluation vector
V = zeros(1, n);
for i = 1:n
L_i = D_w(i, :) * L';
M_i = D_w(i, :) * M';
H_i = D_w(i, :) * H';
V(i) = (L_i + 2*M_i + H_i) / 4;
end
% Normalize the fuzzy synthetic evaluation vector
sum_V = sum(V);
V_n = V / sum_V;
% Print the results
disp('The normalized fuzzy synthetic evaluation vector is:');
disp(V_n);
```
在上面的程序中,我们首先定义了模糊决策矩阵D、三角模糊集L、M和H,以及每个标准的权重w。接下来,我们计算了规范化决策矩阵D_n和加权规范化决策矩阵D_w。然后,我们使用三角模糊数计算了模糊综合评价向量V,并将其规范化以得到最终评价向量V_n。最后,我们输出规范化模糊综合评价向量。
阅读全文