find_containing_fol​der

버전 1.1.0.0 (1.17 KB) 작성자: Rik
Find the full path of your calling function
다운로드 수: 24
업데이트 날짜: 2017/3/23

라이선스 보기

If you have a complex set of functions that are synced over different systems (or run from a USB) it can still be necessary to interact with subfolders. This function implements one of several options to find the full path of the calling function, so you can still create/load files in subfolders not on the Matlab path.
Tested to work on Matlab and Octave. This code should be OS-independent and release-independent.
(I personally use this as a subfunction of a function that returns several folder names. The goal of that file is to allow me to move around folders, without having to check all my code to see if anything breaks.)

Update to v1.1:
Returns the current working directory as output when called from the command window or 'run section' (instead of returning an error).

인용 양식

Rik (2024). find_containing_folder (https://www.mathworks.com/matlabcentral/fileexchange/61475-find_containing_folder), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 File Operations에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Returns the current working directory as output when called from the command window or 'run section' (instead of returning an error).

1.0.0.0