When are Matlab Coder and simulink Coder needed?
Afficher commentaires plus anciens
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?
Réponses (1)
Walter Roberson
le 16 Mai 2015
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 commentaires
Walter Roberson
le 16 Mai 2015
A '.mex' of an S-Function is only good for Simulation. i.e for Model update, Simulating in Normal mode and Accelerator mode (by default). . For generating code you would need the following [...]
You are not dealing with S-functions, but this does have a clear implication that in the listed simulation modes, code is not being generated for the target, that instead the code is run on the MATLAB side.
Anfänger
le 17 Mai 2015
Walter Roberson
le 17 Mai 2015
I do not know when the Real-Time Workshop toolboxes are needed.
Catégories
En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!