フィルターのクリア

list all the files of certain type in directory and put them in a variable

32 ビュー (過去 30 日間)
Walter
Walter 2012 年 6 月 4 日
How do I put all files of certain type in a directory and put them in variable
eg. if my directory has 2 images new.jpg and tell.jpg
I want in matlab
a(1)=new.jpg a(2)=tell.jpg
automatically without me having to hardcode it in..

採用された回答

Thomas
Thomas 2012 年 6 月 4 日
I guess you will have more processing to do after getting all the file names in matlab. Here is a wonderful example on how to process a sequence of file sin MATLAB
else if you just want the names of jpg files in a variable
try
a=dir('*.jpg')
a(1,1).name
a(2,1).name

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by