赞
踩
data2.txt的内容
decision2的内容
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'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。