inherit from two classes simscape
1 次查看(过去 30 天)
显示 更早的评论
What is the syntax to inherit from two superclasses in Simscape?
2 个评论
Adam
2019-10-2
Does the usual dual inheritance syntax not work in Simscape (I have no idea what that is as I don't use it)?
classdef myClass < superclass1 & superclass2
回答(2 个)
J Chen
2019-10-2
Try the following:
component MyComponent < MyBaseComponent1
% component implementation here
end
component MyExtendedComponent < MyComponent
% component implementation here
end
Srimouli Rukmabhatla
2020-4-1
Hi LEO,
For more information please go through the documentation of Subclassing and Inheritance https://www.mathworks.com/help/physmod/simscape/lang/subclassing-and-inheritance.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Foundation and Custom Domains 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!