Include sub-folders automatically in script

조회 수: 19 (최근 30일)
Dilip Rao
Dilip Rao 2012년 8월 30일
Hello, I would like to know if there is a command by which I can include subfolders in my working path? ex: I have a folder structure which looks like x(main folder)-- a, b, c and d (sub-folders).Everytime I have to incluse all these folders I have to write [workpath, filesep, 'x'];... [workpath, filesep, 'x', filesep, 'a'];... and so on. All I need now is to reduce these extra lines and have just one line which will include all paths. Thank you.

채택된 답변

Robert Cumming
Robert Cumming 2012년 8월 30일
I'm not 100% sure what your after - but have you seen
help genpath
e.g.
addpath ( genpath ( pwd ) )

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by