This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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.c in the Simulink model sfcndemo_sfun_multiport for an example.

Introduced before R2006a