MATLAB Answers

Simscape Model source code

24 views (last 30 days)
Ryan Goodfellow
Ryan Goodfellow on 18 Nov 2016
Answered: Rafa Fernan on 21 Nov 2017
I have created a Simscape model by dragging dropping and connecting various components from the electrical foundation library. Now I am interested in looking at the underlying Simscape language source code of the interconnected components. This is similar to how I use OpenModelica for example. How do I do this? I have figured out how to view the source for a single component, but not the entire composition that is in my .slx file. The underlying goal here is to have a look at the DAEs and their interconnections.
Thanks!
~ry

  0 Comments

Sign in to comment.

Answers (2)

Lucas Lebert
Lucas Lebert on 6 Dec 2016
Hi Ryan, you can access the source code of every block from the Simscape Foundation Library->Electrical, if you double click on the block and click on the link "Source Code". However this is not possible for blocks of the Simscape Electronics library. There is no option to access the source code of these blocks. The functionality of these blocks is explained in detail in the MATLAB documentation though.

  1 Comment

Ryan Goodfellow
Ryan Goodfellow on 21 Dec 2016
Hi Lucas,
Thanks for the response, but it does not address the question. I have already stated that I know how to get the equations for a particular component. What I want is the DAE equation system for a composition of components that I create in the designer interface. I require these equations to run a structural analysis algorithm I have coded.

Sign in to comment.


Rafa Fernan
Rafa Fernan on 21 Nov 2017
Hi Ryan,
I'm looking for the same topic, how I can get the DAE equation system of my simscape system. Did you get it Ryan?
Regards Rafa

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by