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개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by