How to loop through files that I have added to path?

3 ビュー (過去 30 日間)
cocopuffs
cocopuffs 2014 年 7 月 23 日
コメント済み: Azzi Abdelmalek 2014 年 7 月 23 日
Hi,
I have a folder that I added to matlab path. the folder contains 2400 .tif files - I need to loop through each image, do calculations on the image and then go to the next image to do same calculation. i am new to the matlab so I need the help. I will greatly appreciate the help. Thank you in advanced. Please help me.
thank you. cocopuffs

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 23 日
pat='E:' % Your folder
fil=fullfile(pat,'*.tif')
d=dir(fil)
for k=1:numel(d)
filename=fullfile(pat,d(k).name)
% do
end
  2 件のコメント
cocopuffs
cocopuffs 2014 年 7 月 23 日
編集済み: cocopuffs 2014 年 7 月 23 日
Thank you for answar! my folder found in C:cygwin:bin: mov
mov is folder with .tif files. images inside folder called 'image k .tif', k being any number from 100-2500. How i access this file using your method? Please respond thank you again.
Thank you so much
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 23 日
pat='your_folder'
fil=fullfile(pat,'image*.tif')
d=dir(fil)
for k=1:numel(d)
filename=fullfile(pat,d(k).name)
% do
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by