What is done in this line? f = f(arrayfun(@(x) x.name(1), f) ~= '.');

1 回表示 (過去 30 日間)
Shaila parvin
Shaila parvin 2013 年 5 月 28 日
clc
clear all
close all
dirpath = 'E:\4-1\image-thesis\implementation\shaila\';
f=dir(fullfile(dirpath,'*.jpg'));
f = f(arrayfun(@(x) x.name(1), f) ~= '.');
for i=1:length(f)
a=imread(strcat(dirpath,f(i).name));
if (ndims(a)==2 | (a(:,:,1)==a(:,:,2) & a(:,:,2)==a(:,:,3)))
%if (ndims(a)==2)
figure;imshow(a)
end
end
What is done in this line?
f = f(arrayfun(@(x) x.name(1), f) ~= '.');

採用された回答

Matt J
Matt J 2013 年 5 月 28 日
編集済み: Matt J 2013 年 5 月 28 日
It takes file names obtained from DIR and throws away those that begin with '.'

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by