How can I access source code for Simscape components shipped with MATLAB?

조회 수: 36 (최근 30일)
I am trying to create a custom Simscape component. I would like to view the source code for some of the shipped Simscape components as a reference while I create my custom component. How can I view the source code?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 3월 7일
편집: MathWorks Support Team 2023년 3월 7일
You can view the source code for select blocks in the Simscape family of products. To determine if the source code is available, open the block mask and click on the description tab. If available, a blue hyperlink to the source code will be displayed. See the example below for our “Resistor” block:
 
Alternatively, you can search for any piece of Simscape code in your “matlabroot\toolbox\physmod” folder. Note that anything with a .SSC file extension is available to see, but anything with a .SSCP file extension is protected.
  댓글 수: 1
J Chen
J Chen 2023년 3월 20일
Use edit in the command window with the file location such as
edit ([matlabroot '\toolbox\physmod\simscape\library\m\+foundation\+mechanical\+rotational\inertia.ssc'])

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating Custom Components and Libraries에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by