When are Matlab Coder and simulink Coder needed?

조회 수: 4 (최근 30일)
Anfänger
Anfänger 2015년 5월 16일
댓글: Walter Roberson 2015년 5월 17일
I have built some simulink models which contain the Matlab Function Block. I used to run a co-simulation with GT-Power without any problems (the simulation was run from simulink). This means that Matlab generated code successfully without any need to the Matlab Coder Toolbox (I don't have the license). Now, I need to run my simulation from the GT-Power, and for this, I have to generate code for my Simulink models. For this, I have used the Real-Time Workshop Toolbox. But it is giving the following error:
Unable to check out the MATLAB Coder license which is needed to generate code
If the Matlab-Coder Toolbox is required, how come code was generated before successfully. When do I need only one of the Matlab-Coder and Real-Time Workshop Toolboxex , and when do I need both?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 5월 16일
MATLAB Function Blocks are evaluated in MATLAB when running in simulation mode. See here
With a MATLAB Function block, you can write a MATLAB® function for use in a Simulink® model. The MATLAB function you create executes for simulation and generates code for a Simulink Coder™ target.
In other words until you Build your model to generate target code, the function executes in MATLAB.
  댓글 수: 3
Anfänger
Anfänger 2015년 5월 17일
So, when ever I have a Matlab Function Block, and I would like to build my model, I will need both the Matlab-Coder and Real-Time Workshop Toolboxes? Else, only the later is required to build the model?
Walter Roberson
Walter Roberson 2015년 5월 17일
I do not know when the Real-Time Workshop toolboxes are needed.

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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by