フィルターのクリア

structuring of folder name

2 ビュー (過去 30 日間)
prashant singh
prashant singh 2016 年 7 月 10 日
回答済み: Image Analyst 2016 年 7 月 10 日
how can i divide the path like C:/document/data/data-1/ into a structure which contain name of individual folder like {document, data, data-1} or just access the last folder into a variable like x = data-1.

採用された回答

Image Analyst
Image Analyst 2016 年 7 月 10 日
Try this:
folder = 'C:/document/data/data-1/'
individualFolders = strsplit(folder, '/')
folder =
C:/document/data/data-1/
individualFolders =
'C:' 'document' 'data' 'data-1' ''

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by