Select TOC

A

Ada S-functions
    creating
    example
    GNAT Ada95 compiler
    mex syntax
    source file format
    specification
additional parameters for M-file S-functions
array bounds
    checking

B

block I/O ports
block-based sample times
    specifying
Build Info pane
    S-Function Builder

C

C language header file
    matlabroot/simulink/include/simstruc.h
C MEX S-functions
    advantages
    converting from level 1 to level 2
    creating
    definition
    example
    modes for compiling
    S-Function Builder
    Simulink interaction
C++ objects
    making persistent
C++ S-functions
    building
    mex command
callback methods
CFortran
cg_sfun.h
checking array bounds
compiler compatibility
    Fortran
continuous blocks
    setting sample time
Continuous Derivatives pane
    S-Function Builder
continuous state S-function example (C MEX)
creating persistent C++ objects
C-to-Fortran gateway S-function

D

data types
    using user-defined
direct feedthrough
discrete state S-function example (C MEX)
Discrete Update pane
    S-Function Builder
dynamically sized inputs

E

error handling
    checking array bounds
    exception free code
examples
    Ada S-function specification
    C MEX S-function
    continuous state S-function (C MEX)
    discrete state S-function (C MEX)
    Fortran MEX S-function
    hybrid system S-function (C MEX)
    pointer work vector
    sample time for continuous block
    sample time for hybrid block
    time-varying continuous transfer function (C MEX)
    variable-step S-function (C MEX)
    zero-crossing S-function (C MEX)
exception free code
extern "C" statement

F

Fortran compilers
Fortran math library
Fortran MEX S-functions
    example
    template file
frame-based signals, implementing in S-functions
function-call subsystems

H

header files
hybrid blocks
    setting sample time
hybrid sample times
    specifying
hybrid system S-function example (C MEX)

I

Initialization pane
    S-Function Builder
input ports
    how to create
inputs, dynamically sized

L

level 1 C MEX S-functions
    converting to level 2
Libraries pane
    S-Function Builder

M

masked multiport S-functions
matlabroot/simulink/include/simstruc.h C language header file
matlabroot/simulink/src/csfunc.c example file
matlabroot/simulink/src/dsfunc.c example file
matlabroot/simulink/src/mixedm.c example file
matlabroot/simulink/src/sfun_counter_cpp.cpp
    ensuring Simulink compatibility of C++ S-functions
matlabroot/simulink/src/sfun_timestwo_for.for Fortran example file
matlabroot/simulink/src/sfun_zc_sat.c example file
matlabroot/simulink/src/stvctf.c example file
matlabroot/simulink/src/vsfunc.c example file
matrix.h
mdlCheckParameters
mdlDerivatives
mdlGetTimeOfNextVarHit
mdlInitializeConditions
mdlInitializeSampleTimes
mdlInitializeSizes
    and sizes structure
    calling sizes
mdlOutputs
mdlProcessParameters
mdlRTW
mdlSetDefaultPortComplexSignals
mdlSetDefaultPortDataTypes
mdlSetDefaultPortDimensionInfo
mdlSetInputPortComplexSignal
mdlSetInputPortDataType
mdlSetInputPortDimensionInfo
mdlSetInputPortFrameData
mdlSetInputPortSampleTime
mdlSetInputPortWidth
mdlSetOutputPortComplexSignal
mdlSetOutputPortDataType <1> <2>
mdlSetOutputPortDimensionInfo
mdlSetOutputPortSampleTime
mdlSetOutputPortWidth
mdlSetWorkWidths
mdlStart
mdlTerminate
mdlUpdate
mdlZeroCrossings
memory allocation
memory and work vectors
mex command
    building Ada S-functions
    building C MEX S-functions
    building C++ S-functions
mex.h
M-file S-functions
    arguments
    creating
    defining characteristics
    definition
    passing additional parameters
    routines
multirate S-Function blocks
    synchronizing

O

obsolete macros
options, S-function
output ports
    how to create
Outputs pane
    S-Function Builder

P

parameters
    M-file S-functions
    passing to S-functions
    run-time parameters
    tunable parameters
penddemo demo
persistence
    C++ objects
port-based sample times
    constant
    inherited
    specifying
    triggered

R

reentrancy
run-time parameter names, uniqueness of
run-time parameters
run-time routines

S

S_FUNCTION_LEVEL 2, #define
S_FUNCTION_NAME, #define
sample times
    block-based
    continuous block example
    hybrid block example
    port-based
    specifying block-based <1> <2>
    specifying hybrid
    specifying port-based
scalar expansion of inputs
S-Function blocks
    multirate
    S-functions parameters field
    synchronizing multirate
S-Function Builder
    Build Info pane
    Continuous Derivatives pane
    customizing
    Discrete Update pane
    for C MEX S-functions
    Initialization pane
    Libraries pane
    Outputs pane
    setting the include path
S-function routines
    M-file
S-functions
    building C++
    C MEX
    creating Ada
    creating C MEX
    creating Fortran
    creating level 2 with Fortran
    creating persistent C++ objects
    creating run-time parameters
    definition
    direct feedthrough
    exception free code
    level 1 and level 2
    masked multiport
    options
    purpose
    routines
    run-time parameters
    run-time routines
    using in models
    when to use
    writing in C++
    See also Ada S-functions
    See also C MEX S-functions
    See also C++ S-functions
    See also Fortran MEX S-functions
    See also M-file S-functions
S-functions parameters field
    S-Function block
sfuntmpl.c template
sfuntmpl.m template
    M-file S-function
sfuntmpl_fortran.for template
simsizes function
    M-file S-function
SimStruct
SimStruct macros
simulation loop
simulation stages
simulink.c
sizes structure
    fields
        M-file S-function
    returned in mdlInitializeSizes
SS_OPTION_ALLOW_CONSTANT_PORT_SAMPLE_TIME
SS_OPTION_ALLOW_INPUT_SCALAR_EXPANSION
SS_OPTION_ALLOW_PARTIAL_DIMENSIONS_CALL
SS_OPTION_ALLOW_PORT_BASED_SAMPLE_TIME_IN_TRIGSS
SS_OPTION_ASYNC_RATE_TRANSITION
SS_OPTION_ASYNCHRONOUS
SS_OPTION_CALL_TERMINATE_ON_EXIT
SS_OPTION_CAN_BE_CALLED_CONDITIONALLY
SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME
SS_OPTION_DISCRETE_VALUED_OUTPUT
SS_OPTION_EXCEPTION_FREE_CODE
SS_OPTION_FORCE_NONINLINED_FCNCALL
SS_OPTION_PLACE_ASAP
SS_OPTION_PORT_SAMPLE_TIMES_ASSIGNED
SS_OPTION_REQ_INPUT_SAMPLE_TIME_MATCH
SS_OPTION_RUNTIME_EXCEPTION_FREE_CODE
SS_OPTION_SFUNCTION_INLINED_FOR_RTW
SS_OPTION_SIM_VIEWING_DEVICE
SS_OPTION_USE_TLC_WITH_ACCELERATOR
SS_OPTION_WORKS_WITH_CODE_REUSE
ssCallExternalModeFcn
ssCallSystemWithTid
ssDisableSystemWithTid
ssGetAbsTol
ssGetBlockReduction
ssGetContStateAddress
ssGetContStates
ssGetDataTypeId
ssGetDataTypeName
ssGetDataTypeSize
ssGetDataTypeZero
ssGetDiscStates
ssGetDTypeIdFromMxArray
ssGetDWork
ssGetDWorkComplexSignal
ssGetDWorkDataType
ssGetDWorkName
ssGetDWorkRTWIdentifier
ssGetDWorkRTWStorageClass
ssGetDWorkRTWTypeQualifier
ssGetDWorkUsedAsDState
ssGetDWorkWidth
ssGetdX
ssGetErrorStatus
ssGetInlineParameters
ssGetInputPortBufferDstPort
ssGetInputPortComplexSignal
ssGetInputPortConnected <1> <2>
ssGetInputPortDataType
ssGetInputPortDimensions
ssGetInputPortDirectFeedThrough
ssGetInputPortFrameData
ssGetInputPortNumDimensions
ssGetInputPortOffsetTime
ssGetInputPortOverWritable
ssGetInputPortRealSignal
ssGetInputPortRealSignalPtrs
ssGetInputPortRequiredContiguous
ssGetInputPortSampleTime
ssGetInputPortSampleTimeIndex
ssGetInputPortSignal
ssGetInputPortSignalAddress
ssGetInputPortSignalPtrs
ssGetInputPortWidth
ssGetIWork
ssGetModelName
ssGetModeVector
ssGetModeVectorValue <1> <2>
ssGetNonsampledZCs
ssGetNumContStates
ssGetNumDataTypes
ssGetNumDiscStates
ssGetNumDWork
ssGetNumInputPorts
ssGetNumIWork
ssGetNumModes
ssGetNumNonsampledZCs
ssGetNumOutputPorts
ssGetNumParameters
ssGetNumPWork
ssGetNumRunTimeParams
ssGetNumRWork
ssGetNumSampleTimes
ssGetNumSFcnParams
ssGetOffsetTime
ssGetOutputPortBeingMerged
ssGetOutputPortComplexSignal
ssGetOutputPortDataType
ssGetOutputPortDimensions
ssGetOutputPortFrameData
ssGetOutputPortNumDimensions
ssGetOutputPortOffsetTime
ssGetOutputPortRealSignal
ssGetOutputPortSampleTime
ssGetOutputPortSignal
ssGetOutputPortSignalAddress
ssGetOutputPortWidth
ssGetParentSS
ssGetPath
ssGetPlacementGroup
ssGetPortBasedSampleTimeBlockIsTriggered
ssGetPWork
ssGetPWorkValue
ssGetRealDiscStates
ssGetRootSS
ssGetRunTimeParamInfo
ssGetRWork <1> <2>
ssGetRWorkValue
ssGetSampleTime
ssGetSampleTimeOffset
ssGetSampleTimePeriod
ssGetSFcnParam
ssGetSFcnParamsCount
ssGetSimMode
ssGetSolverMode
ssGetSolverName
ssGetStateAbsTol
ssGetStopRequested
ssGetT
ssGetTaskTime
ssGetTFinal
ssGetTNext
ssGetTStart
ssGetUserData
ssIsContinuousTask
ssIsFirstInitCond
ssIsMajorTimeStep
ssIsMinorTimeStep
ssIsSampleHit
ssIsSpecialSampleHit
ssIsVariableStepSolver
ssParamRec structure
    returned by ssGetRunTimeParamInfo
ssPrintf
ssRegAllTunableParamsAsRunTimeParams
ssRegDlgParamAsRunTimeParam
ssRegisterDataType
ssSampleTimeAndOffsetAreTriggered
ssSetBlockReduction
ssSetCallSystemOutput
ssSetDataTypeSize
ssSetDataTypeZero
ssSetDWorkComplexSignal
ssSetDWorkDataType
ssSetDWorkName
ssSetDWorkRTWIdentifier
ssSetDWorkRTWStorageClass
ssSetDWorkRTWTypeQualifier
ssSetDWorkUsedAsDState
ssSetDWorkWidth
ssSetErrorStatus
ssSetExternalModeFcn
ssSetInputPortComplexSignal
ssSetInputPortDataType
ssSetInputPortDimensionInfo
ssSetInputPortDirectFeedThrough
ssSetInputPortFrameData
ssSetInputPortMatrixDimensions
ssSetInputPortOffsetTime
ssSetInputPortOverWritable
ssSetInputPortRequiredContiguous
ssSetInputPortSampleTime
ssSetInputPortVectorDimension
ssSetInputPortWidth
ssSetIWorkValue
ssSetModeVectorValue
ssSetNumContStates
ssSetNumDiscStates
ssSetNumDWork
ssSetNumInputPorts
ssSetNumIWork
ssSetNumModes
ssSetNumNonsampledZCs
ssSetNumOutputPorts
ssSetNumPWork
ssSetNumRunTimeParams
ssSetNumRWork
ssSetNumSampleTimes
ssSetNumSFcnParams
ssSetOffsetTime
ssSetOneBasedIndexInputPort
ssSetOneBasedIndexOutputPort
ssSetOptions
ssSetOutputPortComplexSignal
ssSetOutputPortDataType
ssSetOutputPortFrameData
ssSetOutputPortMatrixDimensions
ssSetOutputPortOffsetTime
ssSetOutputPortSampleTime
ssSetOutputPortVectorDimension
ssSetOutputPortWidth
ssSetParameterName
ssSetParameterTunable
ssSetPlacementGroup
ssSetPWorkValue
ssSetRunTimeParamInfo
ssSetRWorkValue
ssSetSampleTime
ssSetSFcnParamNotTunable
ssSetSFcnParamTunable
ssSetSolverNeedsReset
ssSetStopRequested
ssSetTNext
ssSetUserData
ssSetVectorMode
ssSetZeroBasedIndexInputPort
ssSetZeroBasedIndexOutputPort
ssUpdateAllTunableParamsAsRunTimeParams
ssUpdateRunTimeParamData
ssUpdateRunTimeParamInfo
ssWarning
ssWriteRTW2dMatParam
ssWriteRTWMx2dMatParam
ssWriteRTWMxVectParam
ssWriteRTWParameters
ssWriteRTWParamSettings
ssWriteRTWScalarParam
ssWriteRTWStr
ssWriteRTWStrParam
ssWriteRTWStrVectParam
ssWriteRTWVectParam
ssWriteRTWWorkVect
synchronizing multirate S-Function blocks

T

templates
    M-file S-function
time-varying continuous transfer function example (C MEX)
tmwtypes.h
tunable parameters

V

variable-step S-function example (C MEX)

W

work vectors
writing S-functions in Ada
writing S-functions in C++
writing S-functions in MATLAB

Z

zero-crossing S-function example (C MEX)