五种灰色关联度分析matlab代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

灰色邓氏关联度分析%P12--TheStudyontheGreyRelationalDegreeandItsApplicationfunctionr1=gld_deng(x)s=size(x);len=s(2);num=s(1);ro=0.5;fori=1:numx(i,:)=x(i,:)./x(i,1);enddx(num,len)=0;fori=2:numfork=1:lendx(i,k)=abs(x(1,k)-x(i,k));endendmax_dx=max(max(dx));min_dx=min(min(dx));r(1,1:len-1)=1;fori=2:numfork=1:lenr(i,k)=(min_dx+ro*max_dx)/(dx(i,k)+ro*max_dx);endendr1=sum(r(2:num,:),2)/(len);改进灰色绝对关联度分析%P11--TheStudyontheGreyRelationalDegreeandItsApplicationfunctionr1=gld_gjjd(x)s=size(x);len=s(2);num=s(1);fori=1:numx(i,:)=x(i,:)./x(i,1);enddx(num,len-1)=0;fori=1:numforj=1:len-1dx(i,j)=x(i,j+1)-x(i,j);endendc=1;beta(1,1:len-1)=0;w(1,1:len-1)=0;fori=2:numtemp=sum(abs(x(i,:)-x(1,:)),2);fork=1:len-1beta(i,k)=atan((dx(i,k)-dx(1,k))/(1+dx(i,k)*dx(1,k)));ifbeta(i,k)0beta(i,k)=pi+beta(i,k);endw(i,k)=1-abs(x(i,k)-x(1,k))/temp;endendr=c./(c+tan(beta./2));wr=w.*r;r1=sum(wr(2:num,:),2)/(len-1);灰色绝对关联度分析%P18--TheStudyontheGreyRelationalDegreeandItsApplicationfunctionr1=gld_jd(x)s=size(x);len=s(2);num=s(1);fori=1:numx(i,:)=x(i,:)./x(i,1);enddx(num,len-1)=0;fori=1:numforj=1:len-1dx(i,j)=x(i,j+1)-x(i,j);endendr(1,1:len-1)=1;fori=2:numfork=1:len-1r(i,k)=1/(1+abs(dx(1,k)-dx(i,k)));endendr1=sum(r(2:num,:),2)/(len-1);灰色T型关联度分析%P19--TheStudyontheGreyRelationalDegreeandItsApplicationfunctionr1=gld_t(x)s=size(x);len=s(2);num=s(1);dx(num,len-1)=0;fori=1:numforj=1:len-1dx(i,j)=abs(x(i,j+1)-x(i,j));endd_x=sum(dx(i,:),2)/(len-1);x(i,:)=x(i,:)./d_x;enddx(num,len-1)=0;fori=1:numforj=1:len-1dx(i,j)=x(i,j+1)-x(i,j);endendr(1,1:len-1)=1;fori=2:numfork=1:len-1ifdx(1,k)*dx(i,k)==0r(i,k)=sign(dx(1,k)*dx(i,k));elser(i,k)=sign(dx(1,k)*dx(i,k))*min(abs(dx(1,k)),abs(dx(i,k)))/max(abs(dx(1,k)),abs(dx(i,k)));endendendr1=sum(r(2:num,:),2)/(len-1);灰色斜率关联度分析%P20--TheStudyontheGreyRelationalDegreeandItsApplicationfunctionr1=gld_xl(x)s=size(x);len=s(2);num=s(1);fori=1:numx(i,:)=x(i,:)./x(i,1);enddx(num,len-1)=0;fori=1:numforj=1:len-1dx(i,j)=x(i,j+1)-x(i,j);endendr(1,1:len-1)=1;fori=2:numfork=1:len-1r(i,k)=1/(1+abs(dx(1,k)/x(1,k+1)-dx(i,k)/x(i,k+1)));endendr1=sum(r(2:num,:),2)/(len-1);

1 / 3
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功