求问关于dir函数读取bmp图片名称的问题。
Ältere Kommentare anzeigen
dirs = dir('E:\matlab\bin\b895d485\test1_images'); % 设定根目录,并读取根目录下的文件夹
l = length(dirs)-2;
for i=3:l+2
path=strcat('samples/ ',dirs(i).name, '/');% 生成当前目录下的路径
files = dir(strcat(path,'*.bmp')); % 获取第i个路径下所有文件名称
end
files无法读取到数据 到底时什么原因呢
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 文件操作 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!