Is it possible to generate C/C++ code for a Simulink model using the Matlab command window?

Rather than using the Coder Toolbox to generated C/C++ code from a Simulink model, via the 'C++ Code' tab -> 'Generate Code', I was wondering if there was a way to perform the same process but from the Matlab Command Window. Possibly something akin to how codegen uses Matlab files. However, the difference being your command would point to a Simulink model in order to produce the desired C/C++ code. I feel like this should be possible, but I cannot find any information on what a command like that would look like.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 3월 29일
rtwbuild()

댓글 수: 1

Thank you! I believe this is exactly what I'm looking for. Not sure why it was so hard for me to find

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2022년 3월 29일

댓글:

2022년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by