Package folders in class folders

조회 수: 3 (최근 30일)
Alexander Cochran
Alexander Cochran 2018년 11월 18일
In MATLAB, a class folder is represented by `foo/@bar/` and a package folder is represented by `foo/+bar`. In my hierarchy, I have classes that define methods in separate files, so the `@bar/` convention is necessary for their containing folders. However, I also have methods that get somewhat complex in their implementation, and would like to have them packaged into... well, packages using the `+bar/` convention, like so:
foo/@classfolder/MyClass.m
foo/@classfolder/method1.m
foo/@classfolder/method2.m
foo/@classfolder/+othermethodstuff/method2helper.m
foo/@classfolder/+othermethodstuff/mexmethod_formethod2helper.m
foo/@classfolder/+othermethodstuff/mexfiles/
I want to do this because methods in my actual code that are represented here by `method2.m` rely on some heavy computations from MEX files that I would prefer to reside in their own folder, with the package system used by MATLAB keeping it clear when I am calling those methods (and from where).
Is this possible? If not, is my only other option dropping the `@` class folder convention and sticking everything into package (`+`) folders?

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by