Download MATLAB Compiler User`s Guide

Transcript
Supported Executable Types
#include "fun.h"
static mlfFunctionTableEntry function_table[1]
= { { "fun", mlxFun, 1, 1 } };
/*
* The function mdlInitializeSizes is a Compiler
* generated Simulink S-function wrapper. Simulink
* calls this function to initialize the S-function's
* "sizes" structure. The arguments to the –u and –y
* mcc options are used to initialize the number of
* inputs and outputs the S-function accepts and
* returns. If –u or –y was not specified, this
* function uses the value –1, which is the same as
* the DYNAMICALLY_SIZED macro.
*/
static void mdlInitializeSizes(SimStruct * S) {
mclInitializeSizes(S, –1, –1);
}
/*
* The function mdlInitializeSampleTimes is a Compiler
* generated Simulink S-function wrapper. Simulink
* calls this function to initialize the S-function's
* sample times array. This function initializes the
* S-function's sample time to be inherited from the
* block driving it.
*/
static void mdlInitializeSampleTimes(SimStruct * S) {
mclInitializeSampleTimes(S);
}
/*
* The function mdlInitializeConditions is a Compiler
* generated Simulink S-function wrapper. Simulink
* calls this function to initialize the S-function's
* states and work vectors. Since Compiler-generated
* S-functions have no states and no work vectors,
* this function is empty.
*/
5-39