MATLAB Answers

0

Generate code from .rtw file

Asked by Vit Valek on 25 Jul 2019
Latest activity Edited by Nick Sarnie on 15 Aug 2019
Hello,
I have file .rtw from model. Is possible to generate code from them or I must generate code only from model (Build Model)?
Thanks,
Vit

  0 Comments

Sign in to comment.

1 Answer

Answer by Abhilash Padma on 29 Jul 2019

Hi,
Yes, it is possible to generate code from .rtw file. You can use the rtwbuild() function and pass the name of the rtw file as an argument to this function to generate code.

  5 Comments

Vit Valek on 30 Jul 2019
I am using R2018a. This command woks:
rtwbuild('model');
It generates code from model, but not from .rtw file. And I need generate from .rtw. Are you sure whether is possible generate code from .rtw file?
Hi Vit,
The RTW file is not sufficient for complete code generation. The RTW file contains information about the model's properties, settings, and modeling style, but does not contain any algorithm or block code. The TLC compiler combines information in the RTW file with the algorithm code in TLC files to produce the final code.
Thanks,
Nick
Vit Valek on 12 Aug 2019
Hi Nick,
Thank you for your answer!
Vit

Sign in to comment.