MATLAB: import package for base class

I have a base class A and a derived class B, which are stored in the following folder structures.

+myPackage (package Path) @A ( folder of class A ) Am ( filename of class ) @B Bm 

Now I want to use class B which has the following title

 classdef B < A 

Unfortunately, this does not work because they are in different folders, and I cannot import like this:

 import myPackage.* classdef B < A 

Is it possible to solve this problem without losing the organization of the folder?

+4
source share
1 answer

I think if you write

 classdef B < mypackage.A 

he should work.

+4
source

Source: https://habr.com/ru/post/1385899/


All Articles