www.gusucode.com > simulinkcoder 案例源码程序 matlab代码 > simulinkcoder/ControlDataTypesOfTunableParametersExample.m
%% Control Data Types of Tunable Parameters % This example illustrates the options that are available for controlling the data type of % tunable parameters in the code that is generated by Simulink Coder. %% Open Example Model % Open the example model |rtwdemo_paramdt|. % Copyright 2015 The MathWorks, Inc. open_system('rtwdemo_paramdt') %% Instructions % # Inspect the workspace variables and associated MATLAB program (double-click yellow blocks) % to see how the parameter data types have been specified. % # Inspect the masked subsystem and its contents to see how they are used in the model. % # Generate code by double-clicking the blue buttons above. % An HTML report is displayed automatically. % # Inspect the generated source files and take note of: % % * The data types used in the parameter declarations/definitions % * How the parameters are used in the code for the Gain and Saturation blocks