what does . and .. refer to
1 回表示 (過去 30 日間)
古いコメントを表示
for i = 1:size(TrainFiles,1)
if not(strcmp(TrainFiles(i).name,'.')|strcmp(TrainFiles(i).name,'..')|strcmp(TrainFiles(i).name,'Thumbs.db'))
Train_Number = Train_Number + 1; % Number of all images in the training database
name{Train_Number}=TrainFiles(i).name;
end
1 件のコメント
Walter Roberson
2020 年 1 月 26 日
User completely changed the question. However, the revised question is valid in itself.
回答 (2 件)
Image Analyst
2020 年 1 月 26 日
It's checking to make sure that the file is not the current folder (dot) or a link to the parent folder (dot dot).
3 件のコメント
Walter Roberson
2020 年 1 月 26 日
I would use
allFileNames = fullfile(yourImageFolder, {fileStructure.name});
Steven Lord
2020 年 1 月 26 日
For the operating systems on which MATLAB is supported, . refers to the current directory and .. the parent directory, as stated on this Wikipedia page.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!