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
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 Exchange에서 Foundation 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