필터 지우기
필터 지우기

inherit from two classes simscape

조회 수: 1 (최근 30일)
LEO LEON
LEO LEON 2019년 9월 18일
답변: Srimouli Rukmabhatla 2020년 4월 1일
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일
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일
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

카테고리

Help CenterFile Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by