inherit from two classes simscape

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

2 件のコメント

Adam
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
LEO LEON
LEO LEON 2019 年 10 月 10 日
In simscape it does not work, but thanks.

サインインしてコメントする。

回答 (2 件)

J Chen
J Chen 2019 年 10 月 2 日

0 投票

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

1 件のコメント

LEO LEON
LEO LEON 2019 年 10 月 10 日
It is a bit awkward and Im not sure it will do the job. But I will try it.
Thanks

サインインしてコメントする。

Srimouli Rukmabhatla
Srimouli Rukmabhatla 2020 年 4 月 1 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeFoundation and Custom Domains についてさらに検索

製品

リリース

R2019a

質問済み:

2019 年 9 月 18 日

回答済み:

2020 年 4 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by