www.gusucode.com > ecoder 案例源码程序 matlab代码 > ecoder/InsertPragmasInGeneratedCodeDemoExample.m
%% Insert Pragmas for Functions and Data in Generated Code % This model shows how to insert pragmas for functions and data in generated code. %% Explore Example Model % Open the example model. % Copyright 2015 The MathWorks, Inc. open_system('rtwdemo_memsec') %% Instructions % # Learn about memory sections by clicking the documentation link in the model. % # View the memory sections in the ECoderDemos package by clicking the button % in the model and then selecting the *Memory Sections* tab. % # View the memory sections selected for this model by clicking the button in the model. % The model-level settings are also the default settings for atomic subsystems. % # Open the SubSystem Parameters dialog for the subsystems to see the % memory section settings for each of the atomic subsystems in the model. % # Generate code by clicking the button in the model. An HTML report is displayed % automatically. Inspect the data and function definitions in the |.c| files and observe % how the generated pragmas correspond to the specified memory sections.