Contents

mdlRTW

Generate code generation data for a C MEX S-function

Required

No

Languages

C, C++

Syntax

#define MDL_RTW
void mdlRTW(SimStruct *S)

Arguments

S

SimStruct representing an S-Function block.

Description

This function is called when the Simulink® Coder™ product is generating the model.rtw file. In C MEX S-functions, you can call the following functions that add fields to the model.rtw file:

In C MEX S-functions, this function must be enclosed in a #if defined(MATLAB_MEX_FILE) statement.

Example

See the S-function sfun_multiport.csfun_multiport.c in the Simulink model sldemo_msfcn_lmssldemo_msfcn_lms for an example.

Was this topic helpful?