%% Interface Simulink(R) Bus Signals & Integrate Custom C Code
%
% This example shows how to interface Simulink(R) bus signals with a
% Stateflow(R) chart, how to define Stateflow data of structure type using
% Simulink.Bus object, and how to integrate custom C code with structure
% typed data.
% 
% In this mode, both inbus and outbus are bus signals used in Stateflow.
% Both variables are defined as Bus Objects of type COUNTERBUS, a bus type
% that was created in the Bus Editor.  This bus type is stored in the
% bus_objects.mat file, which is loaded in the model's PreLoad function.

% Copyright 2006-2012 The MathWorks, Inc.

% modify this to play around with the formatting of the example
mdl = 'sfbus_demo';
open_system(mdl);
evalc('sim(mdl)');
