select folder by its name?
3 ビュー (過去 30 日間)
古いコメントを表示
Good Morning, I'd like to sort folders from a folder, let's say:
I have the folder "A" which contains folders:
1
2
3
4
5...
100
if I use
d = uigetdir('C:\A\number') %where number is the name of the folder,it works.
What about taking 'number' as a variable inside the "uigetdir"? Thanks, jahnludvik
0 件のコメント
採用された回答
Adam
2015 年 2 月 20 日
編集済み: Adam
2015 年 2 月 20 日
n = 10;
d = uigetdir( [ 'C:' filesep 'A' filesep num2str(n) ] )
should work. There are other ways to compose a filename from parts if you prefer, using the fullfile function, but it is equivalent so it's up to you.
fullfile( 'C:', 'A', num2str(n) );
would be the fullfile alternative.
5 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Filename Construction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!