필터 지우기
필터 지우기

Subdirectories in a custom package

조회 수: 2 (최근 30일)
Gaik Tamazian
Gaik Tamazian 2014년 12월 15일
댓글: Sean de Wolski 2014년 12월 16일
I created a toolbox package using the Packager tool integrated in MATLAB (version R2014b). In my toolbox, the functions are organised in subdirectories like base, graphics, etc. Also some functions are in the root directory of the toolbox, which is specified as a toolbox folder in the Packager.
When I installed the package on other computer, it occurred that only functions situated in the root toolbox directory could be called. The subdirectory functions could not be found.
It seems that the Packager adds only the root directory of a toolbox to MATLAB search path. Is there any way to specify the subdirectories to be added to the search path too? Or I have to put all my functions in a single folder?

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 12월 15일
I'd recommend contacting tech support on this one. It's reproducible and no easy workaround other than unpackaging your directory structure seems to exist:
  댓글 수: 2
Gaik Tamazian
Gaik Tamazian 2014년 12월 16일
Thanks, Sean. It seems that all functions must be located in the top level of the toolbox folder according to the documentation. I've also checked other MATLAB toolboxes and they contain all their functions in a single folder.
Sean de Wolski
Sean de Wolski 2014년 12월 16일
I think one workaround might be to have a command in your top-level directory that explicitly adds the other directories to the path. But this kind of defeats the whole point of toolbox packaging.

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

추가 답변 (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