inherit from two classes simscape

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

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Antworten (2)

J Chen
J Chen am 2 Okt. 2019

0 Stimmen

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

1 Kommentar

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

Melden Sie sich an, um zu kommentieren.

Srimouli Rukmabhatla
Srimouli Rukmabhatla am 1 Apr. 2020

0 Stimmen

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

Kategorien

Mehr zu Foundation and Custom Domains finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019a

Gefragt:

am 18 Sep. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by