|
"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ibrk2u$b8l$1@fred.mathworks.com>...
> "Jong Hoong " <jonghoong@hotmail.com> wrote in message <ibra48$dj0$1@fred.mathworks.com>...
> > Hi all,
> > I am having problem with my code which I need to count the number of images browsing from a path and displaying in a static text box. Here is my codes:
> > D = uigetdir('*.jpg');
> > numberfiles = numel(D);
> >
> > set(handles.result,'String',numberfiles);
> >
> > The text box shows me "45" while the folder only have 10 jpg images. What is the problem?
>
> How about:
>
> cd(uigetdir);
> njpgs = numel(dir('*jpg'))
thanks, Sean. I got it worked.
|