当前位置:   article > 正文

matlab约简算法,基于粗糙集信息系统约简的算法matlab实现

基于粗糙集理论的属性约简算法的设计与实现matlab

data2.txt的内容

e6010c8da31b796b084e3b35a2178c10.png

decision2的内容

84c85da02f65dcb874f7d3bf78151bf5.png

Matlab实现函数如下

f unction y=my_test() %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%读取信息系统文件

f ile = textread('data2.txt','%s','delimiter','\n','whitespace','');

[m,n]=size(f ile);

f or i=1:m

words=strread(f ile{i},'%s','delimiter',' ');

words=words';

X{i}=words;

end

X=X';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%读取决策系统文件f ile = textread('decision2.txt','%s','delimiter','\n','whitespace','');

[m,n]=size(f ile);

f or i=1:m

words=strread(f ile{i},'%s','delimiter',' ');

words=words';

D{i}=words;

end

D=D'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/83772
推荐阅读
相关标签
  

闽ICP备14008679号