%% Export Function-Call Susbsystems
% A common modeling pattern is to explicitly execute a collection of blocks
% by using function-call subsystems. Embedded Coder(R)  provides support
% for generating code for function-call subsystems with or without a
% scheduler. 
%
% For many applications, it is desirable to extract only the code for
% individual function-call subsystems without scheduling code.  You can do
% this for individual subsystems or a collection of subsystems.
%
% The example model |rtwdemo_exporting_functions| shows how to generate
% code for a collection of function-call subsystems.
%
% 1. Open model |rtwdemo_exporting_functions|.
%%
model = 'rtwdemo_exporting_functions';
open_system(model);

%%
% 2. Right-click the subsystem |rtwdemo_susbsystem|.
%
% 3. From the menu, select *C/C++ Code > Export Functions*. 
%
% 4. In the *Build code for subsystem* dialog box, configure parameters that
% you want to be tunable. Then, click *Build*.
%
% The code generator produces code for the subsystem.
%
% 5. View the generated code.
%
%%
% Copyright 2019 The MathWorks, Inc.
