How to start code generation programmatically

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

답변 (2개)

chr
chr 2019년 4월 29일
편집: chr 2019년 4월 29일

1 개 추천

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 2019년 4월 29일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

chr
2019년 4월 26일

편집:

chr
2019년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by