Loops in sub folders

조회 수: 1 (최근 30일)
Najiya Omar
Najiya Omar 2018년 1월 15일
댓글: Jan 2018년 1월 16일
I have 10 folders and each one has subfolder which has the same name of all 10 called test. under test folders have subfolders named test1 including the data want to plot two rows.
  댓글 수: 14
Najiya Omar
Najiya Omar 2018년 1월 16일
Thanks
Jan
Jan 2018년 1월 16일
This will not work because it pads the char matrix with spaces:
myPaths = ['100H' ; '200H' ; '300H' ; '400H' ; '%700H' ; '800H' ; '900H' ; '10000H'];
Use a cell string instead:
myPaths = {'100H' ; '200H' ; '300H' ; '400H' ; '%700H' ; '800H' ; '900H' ; '10000H'};
and replace myPaths(i,:) by myPaths{i}.

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2018년 1월 15일
See attached demos to recursively find files in folders and subfolders.

Najiya Omar
Najiya Omar 2018년 1월 16일
this m.file

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by