File Exchange

image thumbnail

Calling Lookup Tables In Stateflow

version 1.2.0.1 (26 KB) by

This example demonstrates four common methods for calling look up tables in Stateflow®.

7 Downloads

Updated

View License

The attached model contains four common methods for accessing lookup tables within Stateflow. The four examples consist of using a Simulink® block in Stateflow, Embedded MATLAB™ functions in Stateflow, calling a function triggered Simulink subsystem in Stateflow, and including C-code in Stateflow. This is demonstrated in the model interp_1d_examples_r2008b.mdl.
If you are using a version of Stateflow prior to version 7.2 R2008b, you can still call lookup tables using three methods such as using Embedded MATLAB functions in Stateflow, calling a function triggered Simulink subsystem in Stateflow, and including C-code in Stateflow. This is demonstrated in the model interp_1d_examples.mdl.

Comments and Ratings (2)

Chris Fillyaw

Hi Wei,

There is no dependence on whether you use a flow chart or a state diagram for these examples. Each case would support both. Thanks for the question.

w sun

Chris, Wonder why to use state in 2 cases and a flow chart in the 3rd in the example. Like to see a comment so there is no confusion.

Updates

1.2.0.1

Updated license

1.3

Added copyright information.

1.2

Updated copyright information.

1.1

Added an example to demonstrate how to use Simulink blocks in Stateflow.

MATLAB Release
MATLAB 7.7 (R2008b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video