私は次のような単純なクラス構造を持っています:
classdef super < hgsetget
properties(Constant = true, Access = private)
PROP1 = 1;
PROP2 = {2 [3 4] [5 6]};
end
methods
function self = super()
// Constructor code here
// ...
end
end
end
その後、そのようなサブクラスによって継承されます。
classdef sub < super
properties
PROP3 = 7;
end
methods
function self = sub()
// Subclass constructor here
// ...
self = self@super();
test = self.PROP1; // I don't appear to have access to PROP1 from Super
end
end
end
私の問題は、スーパーのプロパティにアクセスしようとしたとき、PROP1
またはPROP2
アクセスできないように見えるときです。
クラスsubに適切なメソッド、プロパティ、またはフィールドPROP1がありません。
Matlab内のスーパーのプロパティにアクセスする方法はありますか?