Target Language Compiler    

Continuous States

The CompiledModel.ContStates record is used to generate the continuous states structure (rtX) in the generated code. It contains a mapping between the blocks continuous state (X) and the continuous states structure (rtX).

Table A-13: Model.rtw State Mapping Information
Variable/Record Name
Description
ContStates {

  ContStateDefaults {

    RecordType

ContState

    Width

1

    InitialValue

[0.0]

    StorageClass

Auto

}

NumContStates

ContState record list length (i.e., the number of blocks with continuous states).

ContState {

One record for each block with continuous states.

  Identifier

Unique name (identifier) within the current System record scope. This is always the terminal field for a state value.

  Width

Number of states the block has, if not default

  SigSrc

Block generating this state [systemIdx, callSiteIdx, blockIdx]

  InitialValue

A vector continaing the initial state values; present only when one or more initial state values are nonzero.

}


  Data Type Work (DWork) Information Nonsampled Zero Crossings (NonsampledZCs)