| Contents | Index |
| On this page… |
|---|
Complex data is data whose value is a complex number. For example, an input signal with the value 3 + 5i is complex. See Complex Signals in the Simulink documentation for details.
Use complex data when you model applications in communication systems and digital signal processing. For example, you can use this design pattern to model a frame synchronization algorithm in a communication system:
Use Simulink blocks (such as filters) to process complex signals.
Use Stateflow charts to implement mode logic for frame synchronization.
Let the charts access complex input and output data so that nested MATLAB functions can drive the mode logic.
For an example of modeling a frame synchronization algorithm, see Detection of Valid Transmission Data with Frame Synchronization.
Note Continuous-time variables of complex type are not supported. For more information, see Defining Continuous-Time Variables. |
You can define complex data at these levels of the Stateflow hierarchy:
Charts
Subcharts
States
Functions
You can use complex data to define:
Complex vectors
Complex matrices
You can also use complex data as arguments for:
State actions
Transition actions
MATLAB functions (see Using MATLAB Functions in Stateflow Charts)
Truth table functions (see Truth Table Functions for Decision-Making Logic)
Graphical functions (see Graphical Functions for Reusing Logic Patterns and Iterative Loops)
Change detection operators (see Detecting Changes in Data Values)
For more information, see Operations on Complex Data in Stateflow Action Language and Rules for Using Complex Data in Stateflow Charts.
![]() | Using Complex Data in Stateflow Charts | How to Define Complex Data | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |