Writing S-Functions Previous page   Next Page

Custom Data Types

An S-function can accept and output user-defined as well as built-in Simulink data types. To use a user-defined data type, the S-function's mdlInitializeSizes routine must

  1. Register the data type, using ssRegisterDataType.
  2. Specify the amount of memory in bytes required to store an instance of the data type, using ssSetDataTypeSize.
  3. Specify the value that represents zero for the data type, using ssSetDataTypeZero.

Previous page  Masked Multiport S-Functions Sample Times Next page

© 1994-2005 The MathWorks, Inc.