3.0

3.0 | 1 rating Rate this file 13 Downloads (last 30 days) File Size: 26 KB File ID: #12845
image thumbnail

Calling Lookup Tables In Stateflow

by Chris Fillyaw

 

01 Nov 2006 (Updated 30 Sep 2009)

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

| Watch this File

File Information
Description

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.

Required Products Simulink
Stateflow
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
02 Nov 2006 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.

12 Dec 2006 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.

Please login to add a comment or rating.
Updates
09 Jan 2007

Updated description.

11 Nov 2008

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

30 Sep 2009

Updated copyright information.

30 Sep 2009

Added copyright information.

Tag Activity for this File
Tag Applied By Date/Time
stateflow Chris Fillyaw 22 Oct 2008 08:46:41
lookup tables Chris Fillyaw 22 Oct 2008 08:46:41
function trigger Chris Fillyaw 22 Oct 2008 08:46:41
simulink Cristina McIntire 11 Nov 2008 15:18:48
embed Cristina McIntire 11 Nov 2008 15:18:52
automotive Cristina McIntire 11 Nov 2008 15:18:59
automotive Chris Fillyaw 11 Nov 2008 15:19:27
simulink Chris Fillyaw 11 Nov 2008 15:19:27
embedded code Chris Fillyaw 11 Nov 2008 15:19:27
automotive Xi Zhang 18 Mar 2009 11:37:39

Contact us at files@mathworks.com