| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
Consider using the block property RTWdata (see S-Function RTWdata). This property is a structure of strings that you can associate with a block. The code generator saves the structure with the model in the model.rtw file and makes the .rtw file more readable. For example, suppose you enter the following commands in the MATLAB Command Window:
mydata.field1 = 'information for field1'; mydata.field2 = 'information for field2'; set_param(sfun_block, 'RTWdata', mydata);
The .rtw file that Real-Time Workshop generates for the block, will include the comments specified in the structure mydata.
Consider using the mdlRTW function to inline your C MEX S-function in the generated code. This is useful when you want to
Rename tunable parameters in the generated code
Introduce nontunable parameters into a TLC file
![]() | Writing Fully Inlined S-Functions with the mdlRTW Routine | Writing S-Functions That Support Expression Folding | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |