www.gusucode.com > simulinkcoder 案例源码程序 matlab代码 > simulinkcoder/SingleRateModelingBareBoardNoOSExample.m

    %% Single-Rate Modeling (Bare Board, No OS)
% This model shows the code generated for a single-rate discrete-time model
% configured for a bare-board target (one with no operating system).  
%% Open Example Model
% Open the example model |rtwdemo_srbb|.

% Copyright 2015 The MathWorks, Inc.

open_system('rtwdemo_srbb')
%%
% The model uses
% one sample time.  Inport block 1 and Inport block 2 both specify a 1-second sample
% time, which is enforced by the *Periodic sample time constraint* option
% on the *Solver*
% configuration page.  To view the solver page, double-click the corresponding yellow button in the model.
% To display the sample times in the model, double-click the corresponding yellow button in the model.
%
% This model is configured to display sample-time colors upon
% diagram update.  Red represents the fastest discrete sample
% time in the model, green represents the second fastest, and 
% yellow represents mixed sample times.  Click the yellow button 
% in the model to update the diagram and show sample-time colors.