How to run m-files automatically ?
显示 更早的评论
Hi,
I have collection of images to analyze using matlab. I made m-file code to analyze one image at a time, but it takes considerable time as there are hundreds of images to run.
Is there anyway to call the files in the folder and run one at a time automatically, without me designating the file name one by one?
Thank you very much for help.
采纳的回答
更多回答(1 个)
Walter Roberson
2012-9-2
1 个投票
3 个评论
Jan
2012-9-2
And when you read this section of the FAQ, I suggest to read the rest also.
Jigar Gada
2012-9-2
编辑:Jigar Gada
2012-9-2
You could use the foll code
folder_cont = dir('C:\Users\*.jpg');
nsize = size((folder_cont),1);
for i = 1:nsize
str=strcat('C:\Users\',D(i).jpg);
im=imread(str);
%%do the processing of the image here
end
Taehyung
2012-9-2
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!