inherit from two classes simscape

1 visualización (últimos 30 días)
LEO LEON
LEO LEON el 18 de Sept. de 2019
Respondida: Srimouli Rukmabhatla el 1 de Abr. de 2020
What is the syntax to inherit from two superclasses in Simscape?
  2 comentarios
Adam
Adam el 2 de Oct. de 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 el 10 de Oct. de 2019
In simscape it does not work, but thanks.

Iniciar sesión para comentar.

Respuestas (2)

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

Iniciar sesión para comentar.


Srimouli Rukmabhatla
Srimouli Rukmabhatla el 1 de Abr. de 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

Categorías

Más información sobre Foundation and Custom Domains en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by