How to create a new directory like (D:\DataSe​ts\TrainRe​sized\Abdo​men) by fetching the last part from the path say Abdomen here in this path example(D:​\DataSets\​Train\Abdo​men) . How i can do it?

1 回表示 (過去 30 日間)
1 level higher folder name say Train(are my original images) and Train_Resized(resized images need to be stored). Resizing and storing i am able to do inside the loop, but not able to create a new directory automatically inside the outer loop when i move to another folder. These lines i tried but didn't help me out.
s = srcFiles(i).folder; % to read the entire path
out = regexp(s,'\','split'); % to split and to fetch each part.
mkdir('D:\DataSets\TrainResized\out(1,6)');
% creates out(1,6) folder but i need Abdomen named folder.
out(1,6) has cell value as Abdomen..

採用された回答

Karthik K
Karthik K 2018 年 3 月 7 日
編集済み: Karthik K 2018 年 8 月 3 日
mkdir('D:\DataSets\Train_Resized\',name)
this line is now working fine. Thank You Sir..

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by