inherit from two classes simscape

What is the syntax to inherit from two superclasses in Simscape?

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
In simscape it does not work, but thanks.

请先登录,再进行评论。

回答(2 个)

Try the following:
component MyComponent < MyBaseComponent1
% component implementation here
end
component MyExtendedComponent < MyComponent
% component implementation here
end

1 个评论

It is a bit awkward and Im not sure it will do the job. But I will try it.
Thanks

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Foundation and Custom Domains 的更多信息

产品

版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by