inherit from two classes simscape
    조회 수: 6 (최근 30일)
  
       이전 댓글 표시
    
What is the syntax to inherit from two superclasses in Simscape?
댓글 수: 2
  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
답변 (2개)
  J Chen
      
 2019년 10월 2일
        Try the following:
component MyComponent < MyBaseComponent1
  % component implementation here
  end
  component MyExtendedComponent < MyComponent
  % component implementation here
end
  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
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



