matlab 將子文件下同名稱文件移植到同一文件夾下並按序排列重命名n.bmp,n=1,2,3...

clc;
clear;
rootpath='D:\Documents\MATLAB\(子文件夾目錄)';
newpath='D:\Documents\MATLAB\(新文件夾目錄)';
count=1;
for i=1:54
       img=imread([rootpath,num2str(i),'\H\FringePattern 0-0.bmp']);
       newfile=[newpath,num2str(count),'.bmp'];
       imwrite(img,newfile)
       count=count+1;
       disp(count);
end

就這麼簡單!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章