XDU的学弟们应该一眼就看明白这是啥意思了。早作参考,早准备分流。
matlab的代码,大二大三的也可以用,把 credit 向量做适当修改就行了。
credit=[5,5,3,2.5,1,5,3.5,3,3,2.5,2.5,1]';
name={"高数1","C","政治1","英语1","体育1","高数2","大物1","离散数学"...
"政治2","线代","英语2","体育2"};
all_credit=sum(credit);
delta=zeros(size(credit,1),1);
for i=1:size(credit)
delta(i) = influence2result(credit,i);
end
function delta=influence2result(credit,index)
c=credit(index);
delta=c/sum(credit);
end