?? usingahp.m
字號:
function UsingAHP
%AHPCALC Perform a complete AHP calculation
% [FINALRANK,RANK,RC]=AHPCALC(ORDER,ALTVCRITERIA,CRITVCRITERIA)
%
% For N alternatives and M criteria for ranking:
%
% ORDER is a matrix with M rows and N columns.
% The elements of the I_th row are the integers 1 to N,
% indexing the alternatives in descending order of preference
% with respect to criterion I.
%
% ALTVCRITERIA is a matrix with M rows and N*(N-1)/2 columns.
% The I_th row contains the upper triangular entries of the AHP
% reciprocal matrix ranking the N alternatives with respect to
% criterion I, in the descending order of preference indicated
% in the I_th row of ORDER.
%
% CRITVCRITERIA may be a vector of length M*(M-1)/2 giving the
% upper triangular entries of the AHP reciprocal matrix
% comparing the criteria, or it may be a normalized vector of
% length M giving the AHP vector weighting the criteria.
%
% RC is the vector giving the normalized weights of the
% criteria. Note that if CRITVCRITERIA is specified as a
% normalized vector, then RC=CRITVCRITERIA
%
% FINALRANK is a normalized vector of length N giving the overall
% ranking of the alternatives.
%
% The rows of RANK give the ranking of the alternatives with
% respect to the individual attributes.
%
m=5;
n=10;
order=zeros(m,n);
for i=1:m
order(i,:)=RandIndexP(n);
end
altvcriteria=rand(m,n*(n-1)/2);
critvcriteria=rand(1,m*(m-1)/2);
[finalrank,rank,rc]=ahpcalc(order,altvcriteria,critvcriteria)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -