Unable to Overload Subsasgn
古いコメントを表示
I'm trying to write a class that overloads the subsasgn function, but I am running into this rather cryptic error:
Class 'MyClass' is not allowed to define a 'subsasgn' method.
Since most of the documentation and discussion about subsasgn comes from the perspective of overloading it, I'm somewhat at a loss to determine why I cannot do this, so basically any suggestion of what might be happening is appreciated.
I'm subclassing dynamicprops, matlab.mixin.Heterogeneous, and matlab.mixin.Copyable. I was worried that it wasn't allowed to overload subsasgn with a class that subclasses dynamicprops, but I've tested that and it works fine in other cases.
I'm on R2012a.
This question follows up on the one I asked here, but since it's since it's separate I thought making a fresh one would be ok: http://www.mathworks.com/matlabcentral/answers/48406-setter-methods-for-dynamic-properties
2 件のコメント
Daniel Shub
2012 年 9 月 21 日
Please post the example code that does not work.
sst
2019 年 2 月 22 日
I was wondering, are there any other base classes that introduce a restriction on overloading subsasgn? I am inheriting from the Simulink.Parameter class and trying to overload the subsasgn function.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Share and Distribute Software についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!