path='U:\2023siying\ML_day56\28ML_Day5\CPM\data';%设置文件所在路径
filelist=dir(fullfile(path,'*.txt'));
for i=1:length(filelist)
fc=load(fullfile(path,filelist(i).name));%读取TXT文件
save([filelist(i).name(1:end-4),'.mat'],'fc')%把FC保存为.mat格式
end
path='U:\2023siying\ML_day56\28ML_Day5\CPM\data';%设置文件所在路径
filelist=dir(fullfile(path,'*.txt'));
for i=1:length(filelist)
fc=load(fullfile(path,filelist(i).name));%读取TXT文件
save([filelist(i).name(1:end-4),'.mat'],'fc')%把FC保存为.mat格式
end