Azzera filtri
Azzera filtri

inherit from two classes simscape

1 visualizzazione (ultimi 30 giorni)
LEO LEON
LEO LEON il 18 Set 2019
What is the syntax to inherit from two superclasses in Simscape?
  2 Commenti
Adam
Adam il 2 Ott 2019
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 il 10 Ott 2019
In simscape it does not work, but thanks.

Accedi per commentare.

Risposte (2)

J Chen
J Chen il 2 Ott 2019
Try the following:
component MyComponent < MyBaseComponent1
% component implementation here
end
component MyExtendedComponent < MyComponent
% component implementation here
end
  1 Commento
LEO LEON
LEO LEON il 10 Ott 2019
It is a bit awkward and Im not sure it will do the job. But I will try it.
Thanks

Accedi per commentare.


Srimouli Rukmabhatla
Srimouli Rukmabhatla il 1 Apr 2020
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

Categorie

Scopri di più su Foundation and Custom Domains in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by