フィルターのクリア

problem with uigetdir in uploading files from it .

2 ビュー (過去 30 日間)
Siddharth
Siddharth 2013 年 5 月 28 日
i created a push button to browse a directory. It works but then I need to upload pics from this directory.
For the browse push button i used:
global c1;
c1=uigetdir;
and for uploading pictures from the directory i used:
global c1;
srcFiles = dir(c1\'*.jpg');
but i get an error saying 'dir is not defined for double inputs'.

採用された回答

Image Analyst
Image Analyst 2013 年 5 月 28 日
filePattern = fullfile(c1, '*.jpg');
srcFiles = dir(filePattern);
  2 件のコメント
Siddharth
Siddharth 2013 年 5 月 28 日
thanks. this worked but i am now getting an error when i am trying to display these images using:
filename = strcat(c1,srcFiles(j).name);
I = imread(filename);
imshow(I);
Siddharth
Siddharth 2013 年 5 月 28 日
i rectified it using the link u sent me. Its working. Thanks.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by