How to start code generation programmatically

11 vues (au cours des 30 derniers jours)
chr
chr le 26 Avr 2019
Modifié(e) : chr le 29 Avr 2019
Hi,
How can I initiate generation of code (using Simulink Coder in my case) from a MATLAB function?
Background: I'd like to create a script that changes the current working directory to a build/-folder, and starts the code generation from there, so that slprj/ ends up in that folder.
cheers,
Christian

Réponses (2)

chr
chr le 29 Avr 2019
Modifié(e) : chr le 29 Avr 2019
Hi,
To be more specific. I'm looking for a MATLAB command/API that allows me to trigger the code generation via a script, similar to how you can trigger an 'update diagram' via
set_param('vdp','SimulationCommand','update')
The script I write would then use that command (possibly together with a 'cd' to the proper folder first).
cheers,
Christian

Naman Bhaia
Naman Bhaia le 29 Avr 2019
Hello Christer,
Check and see if these documentation links help:
Also you can use the cd command to change directory from a script.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by