五种灰色关联度分析matlab代码(4页).docx

上传人:1595****071 文档编号:39780180 上传时间:2022-09-08 格式:DOCX 页数:4 大小:197.41KB
返回 下载 相关 举报
五种灰色关联度分析matlab代码(4页).docx_第1页
第1页 / 共4页
五种灰色关联度分析matlab代码(4页).docx_第2页
第2页 / 共4页
点击查看更多>>
资源描述

《五种灰色关联度分析matlab代码(4页).docx》由会员分享,可在线阅读,更多相关《五种灰色关联度分析matlab代码(4页).docx(4页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、-五种灰色关联度分析matlab代码-第 4 页灰色邓氏关联度分析% P12 - The Study on the Grey Relational Degree and Its Application function r1 = gld_deng(x)s = size(x);len = s(2);num = s(1);ro = 0.5;for i = 1: num x(i,:) = x(i,:)./x(i,1);enddx(num,len) = 0;for i = 2 : num for k = 1 : len dx(i,k) = abs(x(1,k) - x(i,k); endendmax_

2、dx = max(max(dx);min_dx = min(min(dx);r(1,1:len-1) = 1;for i = 2 : num for k = 1 : len r(i,k) = (min_dx + ro*max_dx)/(dx(i,k) + ro*max_dx); endendr1 = sum(r(2:num,:),2)/(len);改进灰色绝对关联度分析% P11 - The Study on the Grey Relational Degree and Its Application function r1 = gld_gjjd(x)s = size(x);len = s(2

3、);num = s(1);for i = 1: num x(i,:) = x(i,:)./x(i,1);enddx(num,len-1) = 0;for i = 1 : num for j = 1 : len - 1 dx(i,j) = x(i,j+1) - x(i,j); endendc = 1;beta(1,1:len-1) = 0;w(1,1:len-1) = 0;for i = 2 : num temp = sum(abs(x(i,:) - x(1,:),2); for k = 1 : len - 1 beta(i,k) = atan(dx(i,k) - dx(1,k)/(1 + dx

4、(i,k)*dx(1,k); if beta(i,k) 0 beta(i,k) = pi + beta(i,k); end w(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 - The Study on the Grey Relational Degree and Its Application function r1 = gld_jd(x)s = size(x);len = s(2);n

5、um = s(1);for i = 1: num x(i,:) = x(i,:)./x(i,1);enddx(num,len-1) = 0;for i = 1 : num for j = 1 : len - 1 dx(i,j) = x(i,j+1) - x(i,j); endendr(1,1:len-1) = 1;for i = 2 : num for k = 1 : len - 1 r(i,k) = 1/(1 + abs(dx(1,k) - dx(i,k); endendr1 = sum(r(2:num,:),2)/(len - 1);灰色T型关联度分析% P19 - The Study o

6、n the Grey Relational Degree and Its Application function r1 = gld_t(x)s = size(x);len = s(2);num = s(1);dx(num,len-1) = 0;for i = 1 : num for j = 1 : len - 1 dx(i,j) = abs(x(i,j+1) - x(i,j); end d_x = sum(dx(i,:),2)/(len - 1); x(i,:) = x(i,:)./d_x;enddx(num,len-1) = 0;for i = 1 : num for j = 1 : le

7、n - 1 dx(i,j) = x(i,j+1) - x(i,j); endendr(1,1:len-1) = 1;for i = 2 : num for k = 1 : len - 1 if dx(1,k)*dx(i,k) = 0 r(i,k) = sign(dx(1,k)*dx(i,k); else r(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); end endendr1 = sum(r(2:num,:),2)/(len - 1);灰色斜率关联度分析% P20

8、- The Study on the Grey Relational Degree and Its Application function r1 = gld_xl(x)s = size(x);len = s(2);num = s(1);for i = 1: num x(i,:) = x(i,:)./x(i,1);enddx(num,len-1) = 0;for i = 1 : num for j = 1 : len - 1 dx(i,j) = x(i,j+1) - x(i,j); endendr(1,1:len-1) = 1;for i = 2 : num for k = 1 : len - 1 r(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);

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁